aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/error.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/error.hh')
-rw-r--r--src/libutil/error.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libutil/error.hh b/src/libutil/error.hh
index 03e43241f..48e6311bd 100644
--- a/src/libutil/error.hh
+++ b/src/libutil/error.hh
@@ -83,6 +83,7 @@ class BaseError : public std::exception
protected:
string prefix_; // used for location traces etc.
ErrorInfo err;
+
std::optional<string> what_;
const string& calcWhat()
{
@@ -107,18 +108,18 @@ public:
.hint = hintfmt(args...)
}
, status(status)
- { }
+ { }
template<typename... Args>
BaseError(const Args & ... args)
: err { .level = lvlError,
.hint = hintfmt(args...)
}
- { }
+ { }
BaseError(ErrorInfo e)
: err(e)
- { }
+ { }
virtual const char* sname() const { return "BaseError"; }