diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-07-03 16:27:39 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-07-03 16:27:39 +0200 |
commit | 14227aeb327798a1446ddde59fc561c3d2e6b7a8 (patch) | |
tree | 72acb28cf81132b2da3d5c8c6dc88cbeeff84692 /src/nix | |
parent | c3c7aedbb5ac869b7c454e90683f77b9c527a75a (diff) | |
parent | b29a4ea1dc650725d7489ecc9dd54ed37446d20f (diff) |
Merge branch 'add-trace' of https://github.com/bburdette/nix
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/repl.cc | 6 | ||||
-rw-r--r-- | src/nix/search.cc | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc index 617d49614..fdacf604b 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -211,12 +211,12 @@ void NixRepl::mainLoop(const std::vector<std::string> & files) // input without clearing the input so far. continue; } else { - printMsg(lvlError, error + "%1%%2%", (settings.showTrace ? e.prefix() : ""), e.msg()); + printMsg(lvlError, e.msg()); } } catch (Error & e) { - printMsg(lvlError, error + "%1%%2%", (settings.showTrace ? e.prefix() : ""), e.msg()); + printMsg(lvlError, e.msg()); } catch (Interrupted & e) { - printMsg(lvlError, error + "%1%%2%", (settings.showTrace ? e.prefix() : ""), e.msg()); + printMsg(lvlError, e.msg()); } // We handled the current input fully, so we should clear it diff --git a/src/nix/search.cc b/src/nix/search.cc index ba72c1e79..93c3f3f83 100644 --- a/src/nix/search.cc +++ b/src/nix/search.cc @@ -216,7 +216,7 @@ struct CmdSearch : SourceExprCommand, MixJSON } catch (AssertionError & e) { } catch (Error & e) { if (!toplevel) { - e.addPrefix(fmt("While evaluating the attribute '%s':\n", attrPath)); + e.addTrace(std::nullopt, "While evaluating the attribute '%s'", attrPath); throw; } } |