aboutsummaryrefslogtreecommitdiff
path: root/src/nix-env/nix-env.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-06-19 13:44:08 -0600
committerBen Burdette <bburdette@gmail.com>2020-06-19 13:44:08 -0600
commit54e8f550c9d5cc88c1161035d366871bb82d4a0c (patch)
treedbd84d78a0a0d7e2b107561487b6d7e033174687 /src/nix-env/nix-env.cc
parent4d1a4f02178b1f77a4bcf2de0483500d89c1424c (diff)
addErrorTrace
Diffstat (limited to 'src/nix-env/nix-env.cc')
-rw-r--r--src/nix-env/nix-env.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 8b0692035..f5dfbf9f6 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -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;
}
}