Improve exception details for `Future_failure`
commit595af2fb94acf69cc8aa6abce0323cce74f0775e
authorMichael Thomas <mjt@meta.com>
Fri, 14 Oct 2022 12:44:15 +0000 (14 05:44 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 14 Oct 2022 12:44:15 +0000 (14 05:44 -0700)
tree5ef666e103d48b914f28e00eb35d8e8691e335e3
parent24eaaf7090bc443c245c5f7f7b8f259fd4eaffb6
Improve exception details for `Future_failure`

Summary:
The `error` union inside a `Future_failure` exception uses a first-class module within the `External` case. As a result, OCaml does not render the inner error (it is existentially bound) and we don't get any useful information about these exceptions.

This diff registers a pretty printer for the `Future_failure` exception which uses `error_to_string` to render the inner `Error.t`

Reviewed By: hgoldstein

Differential Revision: D40224847

fbshipit-source-id: 825cbe48c1005b11bed6489583ce932151789419
hphp/hack/src/utils/process/future.ml
hphp/hack/test/unit/process/process_test.ml