Add general-purpose datastructure for marshalling exceptions
commit021d262a21ce8ae69e271ffc8c74db009e959a1c
authorLucian Wischik <ljw@fb.com>
Thu, 1 Jun 2017 17:42:03 +0000 (1 10:42 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 1 Jun 2017 17:46:17 +0000 (1 10:46 -0700)
treee3be678a7866e2bb7b0bcd4a68a2a5f9d82ad0b7
parentf02a287591d35ed4d846751f18d211272b859a66
Add general-purpose datastructure for marshalling exceptions

Summary: Ocaml doesn't allow us to pattern-match on marshalled exceptions: only obtain its string message. (The compiler and typesystem allow it, but the documentation says "don't\!"). I'm adding a new datatype to carry around marshalled exceptions in. Putting it here in marshal_tools because everyone who amrshals might want to use it.

Reviewed By: arxanas

Differential Revision: D5155539

fbshipit-source-id: a0da1cac53ace7bf9f11c9eaad5f68306b39f2f1
hphp/hack/src/utils/marshal_tools.ml
hphp/hack/src/utils/marshal_tools.mli