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.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libutil/error.hh b/src/libutil/error.hh
index 3879d9b5f..09fc57fee 100644
--- a/src/libutil/error.hh
+++ b/src/libutil/error.hh
@@ -166,6 +166,12 @@ public:
const string & msg() const { return calcWhat(); }
const ErrorInfo & info() { calcWhat(); return err; }
+ template<typename... Args>
+ BaseError & addTrace(std::optional<ErrPos> e, const string &fs, const Args & ... args)
+ {
+ return addTrace(e, hintfmt(fs, args...));
+ }
+
BaseError & addTrace(std::optional<ErrPos> e, hintformat hint);
};