]> git.localhorst.tv Git - blank.git/blob - src/app/error.hpp
move common exceptions to app/error
[blank.git] / src / app / error.hpp
1 #ifndef BLANK_APP_ERROR_HPP_
2 #define BLANK_APP_ERROR_HPP_
3
4 #include <al.h>
5 #include <stdexcept>
6 #include <string>
7
8
9 namespace blank {
10
11 class AlutError
12 : public std::runtime_error {
13
14 public:
15         explicit AlutError(ALenum);
16         AlutError(ALenum, const std::string &);
17
18 };
19
20
21 class GLError
22 : public std::runtime_error {
23
24 public:
25         GLError();
26         explicit GLError(const std::string &);
27
28 };
29
30
31 class NetError
32 : public std::runtime_error {
33
34 public:
35         NetError();
36         explicit NetError(const std::string &);
37
38 };
39
40
41 class SDLError
42 : public std::runtime_error {
43
44 public:
45         SDLError();
46         explicit SDLError(const std::string &);
47
48 };
49
50
51 class SysError
52 : public std::runtime_error {
53
54 public:
55         SysError();
56         explicit SysError(const std::string &);
57         explicit SysError(int err_num);
58         SysError(int err_num, const std::string &);
59
60 };
61
62
63 class TTFError
64 : public std::runtime_error {
65
66 public:
67         TTFError();
68         explicit TTFError(const std::string &);
69
70 };
71
72 }
73
74 #endif