1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

Revert "libmain: Catch logger exceptions in handleExceptions"

This reverts commit 90d1ff4805.

The initial issue with EPIPE was solved in 9f680874c5.
Now this patch does move bad than good by eating up boost::io::format_error that are
bugs.
This commit is contained in:
Sergei Zimmerman 2025-10-23 23:49:41 +03:00
parent d6f1e2de21
commit 4f5af471fb
No known key found for this signature in database

View file

@ -318,7 +318,6 @@ int handleExceptions(const std::string & programName, std::function<void()> fun)
ErrorInfo::programName = baseNameOf(programName);
std::string error = ANSI_RED "error:" ANSI_NORMAL " ";
try {
try {
try {
fun();
@ -346,10 +345,6 @@ int handleExceptions(const std::string & programName, std::function<void()> fun)
printError(error + e.what());
return 1;
}
} catch (...) {
/* In case logger also throws just give up. */
return 1;
}
return 0;
}