9 #ifndef ABSTRACT_EXCEPTION_HH 10 #define ABSTRACT_EXCEPTION_HH 46 PATTERN_GENERATOR = 800,
47 YAML_CPP_PARSING = 900
50 static const std::string EXCEPTION_NAME;
51 virtual const std::string& getExceptionName(
void)
const 53 return EXCEPTION_NAME;
84 const char* what()
const throw();
87 friend
std::ostream& operator<<(
std::ostream& os,
90 #ifdef EXCEPTION_PASSING_PARAM 95 static const int BUFFER_SIZE = 80;
97 const char* functionPTR;
98 char function[BUFFER_SIZE];
101 char file[BUFFER_SIZE];
102 bool pointersSet,
set;
105 Param(
const int& _line,
const char* _function,
const char* _file);
106 Param(
void) : pointersSet(false), set(false)
109 Param& initCopy(
const Param& p);
116 friend const Exc& operator+(
const ExceptionAbstract::Param& p,
const Exc& e)
122 friend Exc& operator+(
const ExceptionAbstract::Param& p, Exc& e)
127 #endif //#ifdef EXCEPTION_PASSING_PARAM 130 #define SOT_RETHROW \ 131 (const ExceptionAbstract& err) \ 136 #ifdef EXCEPTION_PASSING_PARAM 138 throw ExceptionAbstract::Param(__LINE__, __FUNCTION__, __FILE__) + 139 #else //#ifdef EXCEPTION_PASSING_PARAM 140 #define DG_THROW throw 141 #endif //#ifdef EXCEPTION_PASSING_PARAM int code
Error code.
Definition: exception-abstract.hh:59
int getCode(void)
Access to the error code.
Definition: exception-abstract.cpp:43
The ExceptionAbstract class.
Definition: exception-abstract.hh:33
this is this package namespace in order to avoid naming conflict
Definition: device.hh:22
std::string message
Error message (can be empty).
Definition: exception-abstract.hh:62
const char * getMessage(void)
Access to the pointer on the array of char related to the error string.
Definition: exception-abstract.cpp:33
const std::string & getStringMessage(void)
Reference access to the error message (can be empty).
Definition: exception-abstract.cpp:38
ExceptionAbstract(void)
forbid the empty constructor (private).