53 #ifndef __GyotoError_H_ 54 #define __GyotoError_H_ 62 #include <boost/stacktrace.hpp> 107 std::string stacktrace;
108 std::string fullmessage;
120 Error(
const std::string &m, boost::stacktrace::stacktrace
const &trace);
140 operator const char * ()
const;
202 void throwError(std::string
const &, boost::stacktrace::stacktrace
const &trace);
211 #define GYOTO_ERROR(msg) \ 212 Gyoto::throwError(std::string(__FILE__ ":" GYOTO_STRINGIFY(__LINE__) " in ") \ 213 + __PRETTY_FUNCTION__ + ": " + msg, \ 214 boost::stacktrace::stacktrace()) static void setHandler(Gyoto::Error::Handler_t *phandler)
Set application error handler.
const std::string message
Error message.
Definition: GyotoError.h:106
Error(const std::string &m, boost::stacktrace::stacktrace const &trace)
Constructor with an error message.
Class for thowing exceptions.
Definition: GyotoError.h:102
std::string get_message() const
Retrieve error message for custom handling of the exception.
void throwError(std::string const &, boost::stacktrace::stacktrace const &trace)
Throw a Gyoto::Error.
std::string get_stacktrace() const
Retrieve stacktrace description for custom handling of the exception.
const int errcode
Error code.
Definition: GyotoError.h:115
Gyoto ubiquitous macros and typedefs.
Namespace for the Gyoto library.
Definition: GyotoAnsi.h:245
void Handler_t(const Error)
Error handler type.
Definition: GyotoError.h:174
int getErrcode() const
Retrieve error code.
void Report() const
Print-out error message on standard error.