aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/error.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-04-19 22:27:21 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-04-19 22:27:21 +0000
commit55caef36ed1cee2e924c82cf49b3ceb17bdde910 (patch)
tree78af86998140b242713a2c54f35bad45b4cc4449 /src/libutil/error.cc
parent13c669105ca93d28ca1a78321f07fd4ddbb445b1 (diff)
parentee57f91413c9d01f1027eccbe01f7706c94919ac (diff)
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libutil/error.cc')
-rw-r--r--src/libutil/error.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libutil/error.cc b/src/libutil/error.cc
index b2dfb35b2..9172f67a6 100644
--- a/src/libutil/error.cc
+++ b/src/libutil/error.cc
@@ -9,10 +9,9 @@ namespace nix {
const std::string nativeSystem = SYSTEM;
-BaseError & BaseError::addTrace(std::optional<ErrPos> e, hintformat hint)
+void BaseError::addTrace(std::optional<ErrPos> e, hintformat hint)
{
err.traces.push_front(Trace { .pos = e, .hint = hint });
- return *this;
}
// c++ std::exception descendants must have a 'const char* what()' function.
@@ -22,12 +21,9 @@ const std::string & BaseError::calcWhat() const
if (what_.has_value())
return *what_;
else {
- err.name = sname();
-
std::ostringstream oss;
showErrorInfo(oss, err, loggerSettings.showTrace);
what_ = oss.str();
-
return *what_;
}
}