18 #ifndef EXCEPTIONS_HPP
19 #define EXCEPTIONS_HPP
48 virtual const char*
what()
const throw () {
return msg_.c_str(); }
51 #endif // EXCEPTIONS_HPP
An exception class.
Definition: exceptions.hpp:25
std::string msg_
the error message.
Definition: exceptions.hpp:28
Exception(const std::string &message)
Constructor (C++ STL strings).
Definition: exceptions.hpp:39
Exception(const char *message)
Constructor (C strings).
Definition: exceptions.hpp:35
virtual const char * what() const
Returns a pointer to the (constant) error description.
Definition: exceptions.hpp:48
virtual ~Exception()
Destroy this exception.
Definition: exceptions.hpp:42