mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 15:32:43 +01:00
Improve rendering of ignored exceptions
Instead of error (ignored): error: SQLite database '...' is busy we now get error (ignored): SQLite database '...' is busy
This commit is contained in:
parent
e8314e69ab
commit
fde6068874
1 changed files with 6 additions and 2 deletions
|
|
@ -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