1
0
Fork 0

Codechange: Don't use NOT_REACHED() when catching unhandled thread exceptions

pull/12199/head
glx22 2024-03-01 17:04:47 +01:00
parent 3fd5c33ae6
commit d3e2cc015a
1 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,7 @@
#include "debug.h"
#include "crashlog.h"
#include "error_func.h"
#include <system_error>
#include <thread>
#include <mutex>
@ -62,6 +63,8 @@ inline bool StartNewThread(std::thread *thr, const char *name, TFn&& _Fx, TArgs&
try {
/* Call user function with the given arguments. */
F(A...);
} catch (std::exception &e) {
FatalError("Unhandled exception in {} thread: {}", name, e.what());
} catch (...) {
NOT_REACHED();
}