aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-06-24 13:46:25 -0600
committerBen Burdette <bburdette@gmail.com>2020-06-24 13:46:25 -0600
commit023912def37c8db64dec0339d39f2535e0d79e78 (patch)
tree8717fe3d3969291259def7aa9d43d29c3d879dd1 /src/libutil
parent93e9307329567c9f181318c4d4d6dc09de20ea48 (diff)
convenience form of addTrace
Diffstat (limited to 'src/libutil')
-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);
};