aboutsummaryrefslogtreecommitdiffstats
path: root/include/http_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/http_server.h')
-rw-r--r--include/http_server.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/http_server.h b/include/http_server.h
index 94f2fc3..addbbc1 100644
--- a/include/http_server.h
+++ b/include/http_server.h
@@ -99,7 +99,13 @@ namespace crow
};
timer.async_wait(handler);
- io_service_pool_[i]->run();
+ try
+ {
+ io_service_pool_[i]->run();
+ } catch(std::exception& e)
+ {
+ CROW_LOG_ERROR << "Worker Crash: An uncaught exception occurred: " << e.what();
+ }
}));
CROW_LOG_INFO << server_name_ << " server is running, local port " << port_;