mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Revert "libmain: Catch logger exceptions in handleExceptions"
This reverts commit90d1ff4805. The initial issue with EPIPE was solved in9f680874c5. Now this patch does move bad than good by eating up boost::io::format_error that are bugs. (cherry picked from commit4f5af471fb)
This commit is contained in:
parent
61f09a36f8
commit
993a58e2f6
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);
|
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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue