Refactor native state loading in server init. Catch all native load exceptions
commitaf19bebf2bf147f73dcffb298ac4b1ff77d3613d
authorAlexander Chow <achow@fb.com>
Mon, 30 Oct 2017 22:49:38 +0000 (30 15:49 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 30 Oct 2017 23:08:56 +0000 (30 16:08 -0700)
treeb78144cbdd801fd994f9aa74837e32b3bdea83d7
parent7fe800a60d8e49ce9011fbdd098f705a9ee56fb2
Refactor native state loading in server init. Catch all native load exceptions

Summary:
Refactor native state loading in server init.

Just a small refactor with a tiny behavioral change.
Now catching an exception happens further up the call stack,
which catches an exception while making the State_loader future as well.

Currently, when no state is found, an uncaught exception is thrown which
crashes the server. This change will catch that exception.

Reviewed By: dabek

Differential Revision: D6168229

fbshipit-source-id: b06a02cc19831e68308fd52edcaf4b75e2492ad4
hphp/hack/src/server/serverInit.ml
hphp/hack/src/server/serverInit.mli
hphp/hack/src/server/serverLocalConfig.ml
hphp/hack/src/server/serverMain.ml