29 #ifndef EXCEPTIONS_HPP 30 #define EXCEPTIONS_HPP 52 m_msg.append(
", error code: ");
53 m_msg.append(std::to_string(errCode));
58 virtual const char *
what()
const throw () {
virtual const char * what() const
Return the error message, potentially with error code included.
Definition: exceptions.hpp:58
RuntimeException()
Constructor with a default error message.
Definition: exceptions.hpp:80
Exception()
Constructor with a default error message.
Definition: exceptions.hpp:48
RuntimeException(const char *msg, int errCode=0)
Constructor with a custom error message and error code.
Definition: exceptions.hpp:82
A base exception.
Definition: exceptions.hpp:43
std::string m_msg
Error message.
Definition: exceptions.hpp:65
Exception(const char *msg, int errCode=0)
Constructor with a custom error message and error code.
Definition: exceptions.hpp:50
An exception which cannot be directly influenced by the user, or predicted beforehand.
Definition: exceptions.hpp:76