Eris  1.3.23
Exceptions.h
1 #ifndef ERIS_EXCEPTIONS_H
2 #define ERIS_EXCEPTIONS_H
3 
4 #include <Atlas/Objects/Root.h>
5 #include <Atlas/Objects/SmartPtr.h>
6 
7 #include <string>
8 #include <stdexcept>
9 
10 namespace Eris
11 {
12 
19 class BaseException : public std::runtime_error
20 {
21 public:
22  BaseException(const std::string &m) :
23  std::runtime_error(m), _msg(m) {;}
24  virtual ~BaseException() throw();
25  const std::string _msg;
26 };
27 
29 {
30 public:
31  InvalidOperation(const std::string &m) : BaseException(m) {;}
32  virtual ~InvalidOperation() throw();
33 };
34 
37 {
38 public:
39  InvalidAtlas(const std::string& msg, const Atlas::Objects::Root& obj);
40 
41  InvalidAtlas(const std::string& msg, const Atlas::Message::Element& el);
42 
43  virtual ~InvalidAtlas() throw();
44 private:
45  Atlas::Objects::Root m_obj;
46 };
47 
49 {
50 public:
51  NetworkFailure(const std::string &s) :
52  BaseException(s) {;}
53  virtual ~NetworkFailure() throw();
54 };
55 
56 }
57 
58 #endif
Eris::BaseException
This is the Eris base for all exceptions; note it inherits from std::except, which isn't ideal.
Definition: Exceptions.h:20
Eris::InvalidOperation
Definition: Exceptions.h:29
Eris::NetworkFailure
Definition: Exceptions.h:49
Eris::InvalidAtlas
Exception used to indicated malformed or unexpected Atlas from the server.
Definition: Exceptions.h:37