mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
addErrorTrace
This commit is contained in:
parent
4d1a4f0217
commit
54e8f550c9
8 changed files with 270 additions and 220 deletions
|
@ -593,7 +593,7 @@ static void upgradeDerivations(Globals & globals,
|
|||
} else newElems.push_back(i);
|
||||
|
||||
} catch (Error & e) {
|
||||
e.addPrefix(fmt("while trying to find an upgrade for '%s':\n", i.queryName()));
|
||||
e.addTrace(std::nullopt, hintfmt("while trying to find an upgrade for '%s'", i.queryName()));
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -1185,7 +1185,7 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs)
|
|||
} catch (AssertionError & e) {
|
||||
printMsg(lvlTalkative, "skipping derivation named '%1%' which gives an assertion failure", i.queryName());
|
||||
} catch (Error & e) {
|
||||
e.addPrefix(fmt("while querying the derivation named '%1%':\n", i.queryName()));
|
||||
e.addTrace(std::nullopt, hintfmt("while querying the derivation named '%1%'", i.queryName()));
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue