diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-15 14:06:58 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-06-15 14:06:58 +0200 |
commit | 1fb762d11fadc659ef41b79eaddddcce5fbbc192 (patch) | |
tree | e47612705a9af354ab5bdca7864d70b1158ace12 /src/libexpr/eval-inline.hh | |
parent | fd64e4fb96f814440dc337ce664cdbd22e0eabb2 (diff) |
Get rid of explicit ErrorInfo constructors
Diffstat (limited to 'src/libexpr/eval-inline.hh')
-rw-r--r-- | src/libexpr/eval-inline.hh | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/eval-inline.hh index eee49e02e..3d544c903 100644 --- a/src/libexpr/eval-inline.hh +++ b/src/libexpr/eval-inline.hh @@ -9,11 +9,10 @@ namespace nix { LocalNoInlineNoReturn(void throwEvalError(const Pos & pos, const char * s)) { - throw EvalError( - ErrorInfo { - .hint = hintfmt(s), - .nixCode = NixCode { .errPos = pos } - }); + throw EvalError({ + .hint = hintfmt(s), + .nixCode = NixCode { .errPos = pos } + }); } LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v)) @@ -24,11 +23,10 @@ LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v)) LocalNoInlineNoReturn(void throwTypeError(const Pos & pos, const char * s, const Value & v)) { - throw TypeError( - ErrorInfo { - .hint = hintfmt(s, showType(v)), - .nixCode = NixCode { .errPos = pos } - }); + throw TypeError({ + .hint = hintfmt(s, showType(v)), + .nixCode = NixCode { .errPos = pos } + }); } |