summaryrefslogtreecommitdiffstats
path: root/lib/Utils
diff options
context:
space:
mode:
authorZdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com>2009-04-23 16:09:35 +0200
committerZdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com>2009-04-23 16:09:35 +0200
commit4fa35669bd72794b1acae57c98e57297d9e65794 (patch)
tree60496aef56abf999dc4422be9ca0dfca447b1a31 /lib/Utils
parentb6e55adfc8cb425da7c3c72bc3f14e3c28a1291d (diff)
downloadabrt-4fa35669bd72794b1acae57c98e57297d9e65794.tar.gz
abrt-4fa35669bd72794b1acae57c98e57297d9e65794.tar.xz
abrt-4fa35669bd72794b1acae57c98e57297d9e65794.zip
new abrt exception class
Diffstat (limited to 'lib/Utils')
-rw-r--r--lib/Utils/ABRTException.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/Utils/ABRTException.h b/lib/Utils/ABRTException.h
new file mode 100644
index 00000000..32a8dd12
--- /dev/null
+++ b/lib/Utils/ABRTException.h
@@ -0,0 +1,34 @@
+#ifndef ABRTEXCEPTION_H_
+#define ABRTEXCEPTION_H_
+
+#include <string>
+
+typedef enum {EXCEP_UNKNOW,
+ EXCEP_DD_OPEN,
+ EXCEP_DD_LOAD,
+ EXCEP_DD_SAVE,
+ EXCEP_DD_DELETE,
+ EXCEP_DL,
+ EXCEP_PLUGIN,
+ EXCEP_ERROR,
+ EXCEP_FATAL} abrt_exception_t;
+
+class CABRTException
+{
+ private:
+ std::string m_sWhat;
+ abrt_exception_t m_Type;
+ public:
+ CABRTException(const abrt_exception_t& pType, const char* pWhat) :
+ m_sWhat(pWhat),
+ m_Type(pType)
+ {}
+ CABRTException(const abrt_exception_t& pType, const std::string& pWhat) :
+ m_sWhat(pWhat),
+ m_Type(pType)
+ {}
+ abrt_exception_t type() { return m_Type; }
+ std::string what() { return m_sWhat; }
+};
+
+#endif /* ABRTEXCEPTION_H_ */