mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
trying debugThrow
This commit is contained in:
parent
99d69ac23f
commit
2c9fafdc9e
7 changed files with 115 additions and 207 deletions
|
@ -85,7 +85,7 @@ void printValueAsJSON(EvalState & state, bool strict,
|
|||
.errPos = state.positions[v.determinePos(pos)]
|
||||
});
|
||||
e.addTrace(state.positions[pos], hintfmt("message for the trace"));
|
||||
state.debugLastTrace(e);
|
||||
state.debugThrowLastTrace(e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
@ -101,8 +101,7 @@ void ExternalValueBase::printValueAsJSON(EvalState & state, bool strict,
|
|||
JSONPlaceholder & out, PathSet & context) const
|
||||
{
|
||||
auto e = TypeError("cannot convert %1% to JSON", showType());
|
||||
state.debugLastTrace(e);
|
||||
throw e;
|
||||
state.debugThrowLastTrace(e);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue