]> Creatis software - creaBruker.git/blobdiff - lib/src1/brukerexception.h
Use exceptions not to hand any longer on illegal files
[creaBruker.git] / lib / src1 / brukerexception.h
index 94f8375e8677e24d30318ee8c6c5614933836de6..27a107a2a5130e0e32c5a3177e59fffa5e0a95d6 100644 (file)
@@ -38,4 +38,45 @@ private:
 
 };
 
+
+class creaBruker_EXPORT BrukerInitException: public std::exception
+{
+public:
+    BrukerInitException( const std::string& message
+                     )
+      : m_message(message)
+    {}
+
+    ~BrukerInitException() throw() {}
+    
+    virtual const char* what() const throw() {
+        return m_message.c_str();
+    }
+    
+     
+private:
+   std::string m_message;
+
+};
+
+class creaBruker_EXPORT BrukerHopelessException: public std::exception
+{
+public:
+    BrukerHopelessException( const std::string& message
+                     )
+      : m_message(message)
+    {}
+
+    ~BrukerHopelessException() throw() {}
+    
+    virtual const char* what() const throw() {
+        return m_message.c_str();
+    }
+    
+     
+private:
+   std::string m_message;
+
+};
+
 #endif