34 #ifndef ERRUT_ERRORBASE_H
36 #define ERRUT_ERRORBASE_H
43 #define ERRUT_IMPORTEXPORT
53 ErrorBase() { m_objectName = std::string(
"Unnamed object"); }
56 ErrorBase(
const std::string &objName) { m_objectName = objName; }
69 mutable std::string m_errorString;
70 std::string m_objectName;
75 #endif // ERRUT_ERRORBASE_H
Base class which allows an error message to be set.
Definition: errorbase.h:49
ErrorBase(const std::string &objName)
Creates an instance with the object name set to objName.
Definition: errorbase.h:56
ErrorBase()
Creates an instance without an explicit object name.
Definition: errorbase.h:53
std::string getObjectName() const
Returns the stored object name.
Definition: errorbase.h:61
void setErrorString(const std::string &str) const
Derived classes can use this member function to store an error message.
Definition: errorbase.h:67
std::string getErrorString() const
Returns the currently stored error message.
Definition: errorbase.h:64