mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
Merge pull request #14353 from NixOS/backport-14343-to-2.31-maintenance
[Backport 2.31-maintenance] Revert "libmain: Catch logger exceptions in `handleExceptions`"
This commit is contained in:
commit
3cca112d79
1 changed files with 22 additions and 27 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue