Skip to content

Commit

Permalink
Allow exceptions in ServerInit hooks
Browse files Browse the repository at this point in the history
Summary: because some hooks may throw.

Reviewed By: kodafb

Differential Revision: D3899629

fbshipit-source-id: 0d673d211e31bb2fc552ec7d6da340eb70ac5865
  • Loading branch information
binliu19 authored and Hhvm Bot committed Sep 27, 2016
1 parent 219505b commit a55135e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hphp/runtime/server/http-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,13 @@ void HttpServer::runOrExitProcess() {
Logger::Info("debugger server started");
}

InitFiniNode::ServerInit();
try {
InitFiniNode::ServerInit();
} catch (std::exception &e) {
startupFailure(
folly::sformat("Exception in InitFiniNode::ServerInit(): {}",
e.what()));
}

{
BootStats::mark("servers started");
Expand Down

0 comments on commit a55135e

Please sign in to comment.