Exceptions.h

00001 #ifndef ERIS_EXCEPTIONS_H
00002 #define ERIS_EXCEPTIONS_H
00003 
00004 #include <Atlas/Objects/Root.h>
00005 #include <Atlas/Objects/Operation.h>
00006 
00007 #include <string>
00008 #include <stdexcept>
00009 
00010 namespace Eris
00011 {
00012 
00019 class BaseException : public std::runtime_error
00020 {
00021 public:
00022         BaseException(const std::string &m) : 
00023                 std::runtime_error(m), _msg(m) {;}
00024         virtual ~BaseException() throw();
00025         const std::string _msg;
00026 };      
00027         
00028 class InvalidOperation : public BaseException
00029 {
00030 public:
00031         InvalidOperation(const std::string &m) : BaseException(m) {;}
00032         virtual ~InvalidOperation() throw();
00033 };
00034 
00036 class InvalidAtlas : public BaseException
00037 {
00038 public:
00039     InvalidAtlas(const std::string& msg, const Atlas::Objects::Root& obj);
00040     
00041     InvalidAtlas(const std::string& msg, const Atlas::Message::Element& msg);
00042     
00043     virtual ~InvalidAtlas() throw();
00044 private:
00045     Atlas::Objects::Root m_obj;
00046 };
00047 
00048 class NetworkFailure : public BaseException
00049 {
00050 public:
00051         NetworkFailure(const std::string &s) :
00052                 BaseException(s) {;}
00053         virtual ~NetworkFailure() throw();
00054 };
00055 
00056 }
00057 
00058 #endif

Generated on Sun Aug 19 18:51:18 2007 for Eris by  doxygen 1.5.2