Skip to content

Commit

Permalink
Catch std exception in io_service run to print it.
Browse files Browse the repository at this point in the history
Change-Id: Iaf932d13b7921d848e7d341e67819047f71975a8
related-bug: 1476613
  • Loading branch information
haripk committed Jul 21, 2015
1 parent d636253 commit 89f1200
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/io/event_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ void EventManager::RunWithExceptionHandling() {
EVENT_MANAGER_LOG_ERROR("Thrift exception caught : " <<
except.what() << "; ignoring");
continue;
} catch (std::exception &except) {
static std::string what = except.what();
EVENT_MANAGER_LOG_ERROR("Exception caught in io_service run : "
<< what);
exit(-1);
} catch(...) {
EVENT_MANAGER_LOG_ERROR("Exception caught in io_service run : "
"bailing out");
Expand Down

0 comments on commit 89f1200

Please sign in to comment.