HARDT - The Ham Radio DSP Toolkit
hexceptions.h
1 #ifndef __HEXCEPTIONS_H
2 #define __HEXCEPTIONS_H
3 
4 #include <stdlib.h>
5 #include <exception>
6 
11 class HException : public std::exception
12 {
13  protected:
14 
16  const char* _why;
17 
19  const char* _type;
20 
21  public:
22 
24  HException(const char* reason, const char* type);
25 
27  const char* what() const throw();
28 
30  const char* type() const throw();
31 };
32 
40 {
41  public:
42 
44  HInitializationException(const char* reason);
45 };
46 
54 {
55  public:
56 
58  HNetworkException(const char* reason);
59 };
60 
68 {
69  public:
70 
72  HFileIOException(const char* reason);
73 };
74 
82 {
83  public:
84 
86  HAudioIOException(const char* reason);
87 };
88 
96 {
97  public:
98 
100  HNotImplementedException(const char* reason = "Not implemented");
101 };
102 
110 {
111  public:
112 
114  HWriterIOException(const char* reason);
115 };
116 
124 {
125  public:
126 
128  HReaderIOException(const char* reason);
129 };
130 
138 {
139  public:
140 
142  HConverterIOException(const char* reason);
143 };
144 
152 {
153  public:
154 
156  HFilterIOException(const char* reason);
157 };
158 
166 {
167  public:
168 
170  HFilterInitializationException(const char* reason);
171 };
172 
180 {
181  public:
182 
184  HInvalidArgumentException(const char* reason);
185 };
186 
194 {
195 public:
196 
198  HUnknownCommandOpcodeException(const char* reason);
199 };
200 
201 #endif
HException::_type
const char * _type
Definition: hexceptions.h:19
HFilterIOException
Definition: hexceptions.h:151
HConverterIOException
Definition: hexceptions.h:137
HException::what
const char * what() const
Definition: hexceptions.cpp:9
HException::_why
const char * _why
Definition: hexceptions.h:16
HUnknownCommandOpcodeException
Definition: hexceptions.h:193
HInitializationException
Definition: hexceptions.h:39
HException
Definition: hexceptions.h:11
HException::HException
HException(const char *reason, const char *type)
Definition: hexceptions.cpp:3
HReaderIOException
Definition: hexceptions.h:123
HWriterIOException
Definition: hexceptions.h:109
HInvalidArgumentException
Definition: hexceptions.h:179
HException::type
const char * type() const
Definition: hexceptions.cpp:14
HFileIOException
Definition: hexceptions.h:67
HNotImplementedException
Definition: hexceptions.h:95
HFilterInitializationException
Definition: hexceptions.h:165
HAudioIOException
Definition: hexceptions.h:81
HNetworkException
Definition: hexceptions.h:53