HermesCommon
3.0
|
Exception interface Basically a std::exception, but with a constructor with string and with print_msg method. Usage: try { ... throw Hermes::Exceptions::Exception("this is an exception message"); } catch(Hermes::Exceptions::Exception& e) { e.print_msg(); }. More...
#include <exceptions.h>
Public Member Functions | |
Exception () | |
Init exception with default message. | |
Exception (const Exception &e) | |
Exception (const char *msg,...) | |
void | print_msg () const |
print error message to stderr | |
virtual const char * | what () const throw () |
get pointer to error message | |
std::string | info () const |
const char * | get_func_name () const |
Protected Attributes | |
std::stringstream | message |
char | message_char [10000] |
To be compatible with what(). | |
Exception interface Basically a std::exception, but with a constructor with string and with print_msg method. Usage: try { ... throw Hermes::Exceptions::Exception("this is an exception message"); } catch(Hermes::Exceptions::Exception& e) { e.print_msg(); }.
Definition at line 49 of file exceptions.h.
Hermes::Exceptions::Exception::Exception | ( | const char * | msg, |
... | |||
) |
Init exception with message.
[in] | msg | message |
Definition at line 35 of file exceptions.cpp.
const char* Hermes::Exceptions::Exception::get_func_name | ( | ) | const |