mirror of
https://github.com/NixOS/nix
synced 2025-07-03 02:01:48 +02:00
new pos format for more errors
This commit is contained in:
parent
7c3138844c
commit
ec870b9c85
5 changed files with 35 additions and 12 deletions
|
@ -81,7 +81,11 @@ static void prim_fromTOML(EvalState & state, const Pos & pos, Value * * args, Va
|
|||
try {
|
||||
visit(v, parser(tomlStream).parse());
|
||||
} catch (std::runtime_error & e) {
|
||||
throw EvalError("while parsing a TOML string at %s: %s", pos, e.what());
|
||||
throw EvalError(
|
||||
ErrorInfo {
|
||||
.hint = hintfmt("while parsing a TOML string: %s", e.what()),
|
||||
.nixCode = NixCode { .errPos = pos }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue