aboutsummaryrefslogtreecommitdiffstats
path: root/include/http_server.h
diff options
context:
space:
mode:
authoripknHama <ipknhama@gmail.com>2016-08-28 14:46:31 +0900
committeripknHama <ipknhama@gmail.com>2016-08-28 14:46:31 +0900
commit967adf0de55afcb52881cdb1a7b16788c7c283db (patch)
treedbe4fe620a136bdb462a4ad29e83d6d699b3b447 /include/http_server.h
parent45f6d12fd382662675000fb1c60909287733127c (diff)
downloadcrow-967adf0de55afcb52881cdb1a7b16788c7c283db.tar.gz
crow-967adf0de55afcb52881cdb1a7b16788c7c283db.zip
Add websocket feature
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_;