mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
more debug_throw coverage of EvalErrors
This commit is contained in:
parent
3d94d3ba91
commit
eaecaaa00b
5 changed files with 35 additions and 30 deletions
|
@ -84,7 +84,8 @@ void printValueAsJSON(EvalState & state, bool strict,
|
|||
.msg = hintfmt("cannot convert %1% to JSON", showType(v)),
|
||||
.errPos = v.determinePos(pos)
|
||||
});
|
||||
throw e.addTrace(pos, hintfmt("message for the trace"));
|
||||
e.addTrace(pos, hintfmt("message for the trace"));
|
||||
state.debug_throw(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,7 +99,7 @@ void printValueAsJSON(EvalState & state, bool strict,
|
|||
void ExternalValueBase::printValueAsJSON(EvalState & state, bool strict,
|
||||
JSONPlaceholder & out, PathSet & context) const
|
||||
{
|
||||
throw TypeError("cannot convert %1% to JSON", showType());
|
||||
state.debug_throw(TypeError("cannot convert %1% to JSON", showType()));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue