10 #ifndef __SOT_ABSTRACT_EXCEPTION_H
11 #define __SOT_ABSTRACT_EXCEPTION_H
47 PATTERN_GENERATOR = 800
52 return EXCEPTION_NAME;
75 const std::string &getStringMessage(
void);
80 const char *getMessage(
void);
81 const char *what()
const throw();
87 #ifdef SOT_EXCEPTION_PASSING_PARAM
91 static const int BUFFER_SIZE = 80;
93 const char *functionPTR;
94 char function[BUFFER_SIZE];
97 char file[BUFFER_SIZE];
98 bool pointersSet, set;
101 Param(
const int &_line,
const char *_function,
const char *_file);
102 Param(
void) : pointersSet(false), set(false) {}
103 Param &initCopy(
const Param &p);
110 friend const Exc &operator+(
const ExceptionAbstract::Param &p,
const Exc &e) {
115 friend Exc &operator+(
const ExceptionAbstract::Param &p, Exc &e) {
119 #endif // #ifdef SOT_EXCEPTION_PASSING_PARAM
122 #define SOT_RETHROW \
123 (const ExceptionAbstract &err) { throw err; }
125 #ifdef SOT_EXCEPTION_PASSING_PARAM
127 throw ExceptionAbstract::Param(__LINE__, __FUNCTION__, __FILE__) +
128 #else // #ifdef SOT_EXCEPTION_PASSING_PARAM
129 #define SOT_THROW throw
130 #endif // #ifdef SOT_EXCEPTION_PASSING_PARAM