summaryrefslogtreecommitdiff
path: root/ext/dsent/libutil/Exception.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dsent/libutil/Exception.h')
-rw-r--r--ext/dsent/libutil/Exception.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/dsent/libutil/Exception.h b/ext/dsent/libutil/Exception.h
new file mode 100644
index 000000000..88d68cce2
--- /dev/null
+++ b/ext/dsent/libutil/Exception.h
@@ -0,0 +1,29 @@
+#ifndef __EXCEPTION_H__
+#define __EXCEPTION_H__
+
+#include <exception>
+
+#include "String.h"
+
+namespace LibUtil
+{
+ using std::exception;
+
+ // Exception class handles the all exception messages in the program
+ class Exception : public exception
+ {
+ public:
+ // All constructors/destructors/functions in this class don't throw any events
+ Exception(const String& exception_msg_) throw();
+ ~Exception() throw();
+
+ // Derived from std::exception class that returns a null-terminated char string
+ const char* what() const throw();
+
+ private:
+ String mExceptionMsg;
+ };
+}
+
+#endif // __EXCEPTION_H__
+