mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
Merge pull request #13476 from NixOS/improve-ignored-exceptions
Improve rendering of ignored exceptions
This commit is contained in:
commit
36d451ddf4
2 changed files with 7 additions and 3 deletions
|
|
@ -250,7 +250,7 @@ void handleSQLiteBusy(const SQLiteBusy & e, time_t & nextWarning)
|
||||||
if (now > nextWarning) {
|
if (now > nextWarning) {
|
||||||
nextWarning = now + 10;
|
nextWarning = now + 10;
|
||||||
logWarning({
|
logWarning({
|
||||||
.msg = HintFmt(e.what())
|
.msg = e.info().msg
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,8 +190,10 @@ void ignoreExceptionInDestructor(Verbosity lvl)
|
||||||
try {
|
try {
|
||||||
try {
|
try {
|
||||||
throw;
|
throw;
|
||||||
|
} catch (Error & e) {
|
||||||
|
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.info().msg);
|
||||||
} catch (std::exception & e) {
|
} catch (std::exception & e) {
|
||||||
printMsg(lvl, "error (ignored): %1%", e.what());
|
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.what());
|
||||||
}
|
}
|
||||||
} catch (...) { }
|
} catch (...) { }
|
||||||
}
|
}
|
||||||
|
|
@ -202,8 +204,10 @@ void ignoreExceptionExceptInterrupt(Verbosity lvl)
|
||||||
throw;
|
throw;
|
||||||
} catch (const Interrupted & e) {
|
} catch (const Interrupted & e) {
|
||||||
throw;
|
throw;
|
||||||
|
} catch (Error & e) {
|
||||||
|
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.info().msg);
|
||||||
} catch (std::exception & e) {
|
} catch (std::exception & e) {
|
||||||
printMsg(lvl, "error (ignored): %1%", e.what());
|
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue