better exception handling
Summary:
This diff brings more careful exception-handling, including callstacks.
Objective: (1) if there's an unhandled exception on the worker, this should be reported to the orchestrator; (2) every error should have a callstack; (3) distinguish between "the prototype was absent to start with" and "the prototype got shut down part way through"
To achieve this I've modified the payload type that we send or receive over the orchestrator<->prototype fd. It's now a `rpc_payload`. This is either the intended message, or a structure that contains marshalable information about the unhandled exception.
The idea is that when the orchestrator next reads from the worker, rather than getting an Ok_payload, it'll get information about that unhandled exception.
Reviewed By: arxanas
Differential Revision:
D17823547
fbshipit-source-id:
c04c7741e480d4fa8d5b960ad1739e6b5bb5116d