1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 03:56:01 +01:00

Merge pull request #14343 from NixOS/epipe-graceful

Revert "libmain: Catch logger exceptions in `handleExceptions`"
This commit is contained in:
Sergei Zimmerman 2025-10-24 22:52:29 +00:00 committed by GitHub
commit 04606d50d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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