6 #ifndef DYNAMIC_GRAPH_EXCEPTION_ABSTRACT_H 7 #define DYNAMIC_GRAPH_EXCEPTION_ABSTRACT_H 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);
52 char function[BUFFER_SIZE];
55 char file[BUFFER_SIZE];
86 const std::string &getStringMessage()
const;
92 const char *getMessage()
const;
94 virtual const char *
what()
const throw() {
95 return getStringMessage().c_str();
99 DYNAMIC_GRAPH_DLLAPI
friend std::ostream &
operator<<(
110 #ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM 129 #endif // DYNAMICGRAPH_EXCEPTION_PASSING_PARAM std::string message
Error message (can be empty).
Param & initCopy(const Param &p)
virtual ~ExceptionAbstract()
DYNAMIC_GRAPH_DLLAPI std::ostream & operator<<(std::ostream &os, const dynamicgraph::Entity &ent)
ExceptionEnum
Categories error code.
virtual const std::string & getExceptionName() const
Abstract root class for all dynamic-graph exceptions.
Class owned by exceptions to store error locations.
virtual const char * what() const
static const std::string EXCEPTION_NAME