1
0
Fork 0

better error messages

This commit is contained in:
jsteemann 2017-04-27 13:46:35 +02:00
parent 66ec078bd5
commit aa521d5412
1 changed files with 6 additions and 1 deletions

View File

@ -137,9 +137,14 @@ class SchedulerThread : public Thread {
LOG_TOPIC(DEBUG, Logger::THREADS) << "stopped ("
<< _scheduler->infoStatus() << ")";
} catch (std::exception const& ex) {
LOG_TOPIC(ERR, Logger::THREADS)
<< "restarting scheduler loop after caught exception: " << ex.what();
_scheduler->decRunning();
_scheduler->startNewThread();
} catch (...) {
LOG_TOPIC(ERR, Logger::THREADS)
<< "scheduler loop caught an error, restarting";
<< "restarting scheduler loop after unknown exception";
_scheduler->decRunning();
_scheduler->startNewThread();
}