6 #ifndef DYNAMIC_GRAPH_EXCEPTION_ABSTRACT_H 7 #define DYNAMIC_GRAPH_EXCEPTION_ABSTRACT_H 10 #include <dynamic-graph/dynamic-graph-api.h> 11 #include <dynamic-graph/fwd.hh> 17 (const ::dynamicgraph::ExceptionAbstract &err) { throw err; } 19 #ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM 21 throw ::dynamicgraph::ExceptionAbstract::Param(__LINE__, __FUNCTION__, \ 24 #define DG_THROW throw 25 #endif // DYNAMICGRAPH_EXCEPTION_PASSING_PARAM 38 static const int BUFFER_SIZE = 80;
40 Param(
const int &_line,
const char *_function,
const char *_file);
42 : functionPTR(),
function(), line(), filePTR(), file(),
43 pointersSet(
false),
set(
false) {}
46 const char *functionPTR;
47 char function[BUFFER_SIZE];
50 char file[BUFFER_SIZE];
70 static const std::string EXCEPTION_NAME;
75 virtual const std::string &getExceptionName()
const {
return EXCEPTION_NAME; }
81 const std::string &getStringMessage()
const;
87 const char *getMessage()
const;
89 virtual const char *what()
const throw() {
90 return getStringMessage().c_str();
94 DYNAMIC_GRAPH_DLLAPI
friend std::ostream &
105 #ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM 124 #endif // DYNAMICGRAPH_EXCEPTION_PASSING_PARAM std::string message
Error message (can be empty).
Abstract root class for all dynamic-graph exceptions.
Class owned by exceptions to store error locations.
ExceptionEnum
Categories error code.