-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.hpp
48 lines (37 loc) · 834 Bytes
/
error.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef SHADOW_CAST_ERROR_HPP_INCLUDED
#define SHADOW_CAST_ERROR_HPP_INCLUDED
#include "av/fwd.hpp"
#include <stdexcept>
#include <string>
namespace sc
{
struct ModuleError final : std::runtime_error
{
ModuleError(std::string const&);
};
struct CodecError final : std::runtime_error
{
CodecError(std::string const& msg);
};
struct FormatError final : std::runtime_error
{
FormatError(std::string const& msg);
};
struct IOError final : std::runtime_error
{
IOError(std::string const& msg);
};
auto av_error_to_string(int err) -> std::string;
struct CmdLineError final : std::runtime_error
{
enum Type
{
show_help,
show_version,
error
};
Type type;
CmdLineError(Type type, std::string const& msg = "");
};
} // namespace sc
#endif // SHADOW_CAST_ERROR_HPP_INCLUDED