mirror of https://github.com/Icinga/icinga2.git
Catch exceptions in EventQueue::QueueThreadProc.
This commit is contained in:
parent
68ecd7853f
commit
13436cb536
|
@ -103,7 +103,17 @@ void EventQueue::QueueThreadProc(void)
|
|||
# endif /* RUSAGE_THREAD */
|
||||
#endif /* _DEBUG */
|
||||
|
||||
ev();
|
||||
try {
|
||||
ev();
|
||||
} catch (const std::exception& ex) {
|
||||
stringstream msgbuf;
|
||||
msgbuf << "Exception thrown in event handler: " << std::endl
|
||||
<< diagnostic_information(ex);
|
||||
|
||||
Logger::Write(LogCritical, "base", msgbuf.str());
|
||||
} catch (...) {
|
||||
Logger::Write(LogCritical, "base", "Exception of unknown type thrown in event handler.");
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
double et = Utility::GetTime();
|
||||
|
|
Loading…
Reference in New Issue