diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-05-12 11:27:37 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-05-12 11:27:37 -0600 |
commit | 2a19bf86197083e17d9b35596c21e3c1b3f4a170 (patch) | |
tree | a5a3efd99570fb360f0c04d9fcb71ec4f099bfc6 /src/libexpr/eval-inline.hh | |
parent | ec870b9c853ad86fb1ccb482ca87802f1b155a2c (diff) |
move pos to the first arg, to indicate its not used in a fmt template
Diffstat (limited to 'src/libexpr/eval-inline.hh')
-rw-r--r-- | src/libexpr/eval-inline.hh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/eval-inline.hh index e6b838665..eee49e02e 100644 --- a/src/libexpr/eval-inline.hh +++ b/src/libexpr/eval-inline.hh @@ -7,7 +7,7 @@ namespace nix { -LocalNoInlineNoReturn(void throwEvalError(const char * s, const Pos & pos)) +LocalNoInlineNoReturn(void throwEvalError(const Pos & pos, const char * s)) { throw EvalError( ErrorInfo { @@ -22,7 +22,7 @@ LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v)) } -LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v, const Pos & pos)) +LocalNoInlineNoReturn(void throwTypeError(const Pos & pos, const char * s, const Value & v)) { throw TypeError( ErrorInfo { @@ -51,7 +51,7 @@ void EvalState::forceValue(Value & v, const Pos & pos) else if (v.type == tApp) callFunction(*v.app.left, *v.app.right, v, noPos); else if (v.type == tBlackhole) - throwEvalError("infinite recursion encountered", pos); + throwEvalError(pos, "infinite recursion encountered"); } @@ -67,7 +67,7 @@ inline void EvalState::forceAttrs(Value & v, const Pos & pos) { forceValue(v, pos); if (v.type != tAttrs) - throwTypeError("value is %1% while a set was expected", v, pos); + throwTypeError(pos, "value is %1% while a set was expected", v); } @@ -83,7 +83,7 @@ inline void EvalState::forceList(Value & v, const Pos & pos) { forceValue(v, pos); if (!v.isList()) - throwTypeError("value is %1% while a list was expected", v, pos); + throwTypeError(pos, "value is %1% while a list was expected", v); } /* Note: Various places expect the allocated memory to be zeroed. */ |