1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 01:11:15 +02:00

convenience form of addTrace

This commit is contained in:
Ben Burdette 2020-06-24 13:46:25 -06:00
parent 93e9307329
commit 023912def3
5 changed files with 18 additions and 12 deletions

View file

@ -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);
};