Merge pull request #6057 from trofi/fix-daemon-crashes

Make sure no exceptions leave ignoreException()
This commit is contained in:
Eelco Dolstra 2022-02-07 20:42:19 +01:00 committed by GitHub
commit 725817c223
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1358,11 +1358,15 @@ std::string shellEscape(const std::string_view s)
void ignoreException()
{
/* Make sure no exceptions leave this function.
printError() also throws when remote is closed. */
try {
throw;
} catch (std::exception & e) {
printError("error (ignored): %1%", e.what());
}
try {
throw;
} catch (std::exception & e) {
printError("error (ignored): %1%", e.what());
}
} catch (...) { }
}
bool shouldANSI()