Class Error
-
class Error
A convenient exception handling class.
Public Functions
-
Error(ErrorCode c, std::string func, const char *msg = 0, ...)
Error with optional printf-style message.
-
Error(std::exception&, std::string func, std::string msg = std::string())
Used to rethrow std::exception.
-
virtual ~Error()
Virtual destructor enables inheritance.
-
virtual void report(std::ostream &ostr) const
Write error and auxilliary info to ostream.
-
virtual std::string warning() const
Write function name and error message to screen.
-
const std::string get_message() const
Get the error message.
-
inline ErrorCode get_code() const
Get the error code.
Public Static Functions
-
static const char *err2str(ErrorCode code)
convert an error code to a character string
-
Error(ErrorCode c, std::string func, const char *msg = 0, ...)