Nuitrack  1.6.0
3D Skeleton Tracking Middleware
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Groups Pages
Error.h
1 #ifndef NUITRACK_ERROR_H_
2 #define NUITRACK_ERROR_H_
3 
4 #include <stdexcept>
5 
6 #include "nuitrack/types/Export.h"
7 
8 namespace tdv
9 {
10 namespace nuitrack
11 {
12 
21 {
22  OK,
31 };
32 
37 class Exception : public std::runtime_error
38 {
39 public:
40  Exception(const std::string& msg = "")
41  : std::runtime_error(msg)
42  {
43  }
44 
49  virtual ExceptionType type() const
50  {
51  return EXCEPTION;
52  }
53 };
54 
59 {
60 public:
61  TerminateException(const std::string& msg = "")
62  : Exception(msg)
63  {
64  }
65 
66  virtual ExceptionType type() const
67  {
68  return TERMINATE_EXCEPTION;
69  }
70 };
71 
76 {
77 public:
78  BadConfigValueException(const std::string& msg = "")
79  : Exception(msg)
80  {
81  }
82 
83  virtual ExceptionType type() const
84  {
86  }
87 };
88 
93 {
94 public:
95  ConfigNotFoundException(const std::string& msg = "")
96  : TerminateException(msg)
97  {
98  }
99 
100  virtual ExceptionType type() const
101  {
103  }
104 };
105 
110 {
111 public:
112  ModuleNotFoundException(const std::string& msg = "")
113  : TerminateException(msg)
114  {
115  }
116 
117  virtual ExceptionType type() const
118  {
120  }
121 };
122 
127 {
128 public:
129  LicenseNotAcquiredException(const std::string& msg = "")
130  : TerminateException(msg)
131  {
132  }
133 
134  virtual ExceptionType type() const
135  {
137  }
138 };
139 
144 {
145 public:
146  ModuleNotInitializedException(const std::string& msg = "")
147  : TerminateException(msg)
148  {
149  }
150 
151  virtual ExceptionType type() const
152  {
154  }
155 };
156 
161 {
162 public:
163  ModuleNotStartedException(const std::string& msg = "")
164  : TerminateException(msg)
165  {
166  }
167 
168  virtual ExceptionType type() const
169  {
171  }
172 };
173 
174 
175 } /* namespace nuitrack */
176 } /* namespace tdv */
177 
178 #endif /* NUITRACK_ERROR_H_ */
virtual ExceptionType type() const
Exception type as enum value.
Definition: Error.h:168
tdv::nuitrack::ModuleNotInitializedException
Definition: Error.h:29
virtual ExceptionType type() const
Exception type as enum value.
Definition: Error.h:100
ExceptionType
Possible error codes for Nuitrack internal functions.
Definition: Error.h:20
Common Nuitrack exception class.
Definition: Error.h:37
virtual ExceptionType type() const
Exception type as enum value.
Definition: Error.h:83
virtual ExceptionType type() const
Exception type as enum value.
Definition: Error.h:117
virtual ExceptionType type() const
Exception type as enum value.
Definition: Error.h:134
tdv::nuitrack::ModuleNotFoundException
Definition: Error.h:27
virtual ExceptionType type() const
Exception type as enum value.
Definition: Error.h:49
tdv::nuitrack::ConfigNotFoundException
Definition: Error.h:26
tdv::nuitrack::TerminateException
Definition: Error.h:24
virtual ExceptionType type() const
Exception type as enum value.
Definition: Error.h:66
tdv::nuitrack::Exception
Definition: Error.h:23
tdv::nuitrack::BadConfigValueException
Definition: Error.h:25
virtual ExceptionType type() const
Exception type as enum value.
Definition: Error.h:151
tdv::nuitrack::ModuleNotStartedException
Definition: Error.h:30
Definition: Error.h:58
No exception.
Definition: Error.h:22
tdv::nuitrack::LicenseNotAcquiredException
Definition: Error.h:28