34 #ifndef ERRUT_ERRORBASE_H
36 #define ERRUT_ERRORBASE_H
38 #include "errutconfig.h"
52 ErrorBase() { m_objectName = std::string(
"Unnamed object"); }
55 ErrorBase(
const std::string &objName) { m_objectName = objName; }
68 mutable std::string m_errorString;
69 std::string m_objectName;
Base class which allows an error message to be set.
Definition: errorbase.h:49
void setErrorString(const std::string &str) const
Derived classes can use this member function to store an error message.
Definition: errorbase.h:66
ErrorBase(const std::string &objName)
Creates an instance with the object name set to objName.
Definition: errorbase.h:55
ErrorBase()
Creates an instance without an explicit object name.
Definition: errorbase.h:52
std::string getObjectName() const
Returns the stored object name.
Definition: errorbase.h:60
std::string getErrorString() const
Returns the currently stored error message.
Definition: errorbase.h:63