mirror of
https://github.com/NixOS/nix
synced 2025-06-26 11:41:15 +02:00
Merge remote-tracking branch 'origin/master' into coerce-string
This commit is contained in:
commit
e93b59fbc5
170 changed files with 4010 additions and 2203 deletions
|
@ -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_;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue