Handle Nonfatal_rpc_exception for non-persistent clients
commite833ab2a266218633f94323cfa95a431aa42d255
authorKasper Kopec <kasper@fb.com>
Fri, 9 Mar 2018 22:02:13 +0000 (9 14:02 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 9 Mar 2018 22:21:19 +0000 (9 14:21 -0800)
treeb7103fbe36cfdb5c7165a27c55f3cf13085635b7
parent0ba690a972cdd6f82130d3fd94256a64ccbfacbc
Handle Nonfatal_rpc_exception for non-persistent clients

Summary:
D6947335 wrapped some exceptions thrown inside `ServerCommand.handle` method with `Nonfatal_rpc_exception` and updated `handle_persistent_connection_` method to expect them.

This also changed the exceptions that `handle_connection_` (the non-persistent version) sees. All the special match cases would no longer be hit and everything goes to the generic catch-all. This mostly affects spamminess of logging (both Scuba and logfile).

I fix it here, and also make use of environment recovered from `Nonfatal_rpc_exception` that would be ignored before.

Reviewed By: ljw1004

Differential Revision: D7207797

fbshipit-source-id: 858f1d415c2ff3e1b23e4ce0c9a4b998ed100468
hphp/hack/src/server/serverMain.ml