Refactor hackfmt main to have only one Logger.exit call
commit39557ca5b8291dce0384eb25d4e37ec735926818
authorJake Bailey (Hacklang) <jakebailey@fb.com>
Wed, 15 Aug 2018 23:50:12 +0000 (15 16:50 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 16 Aug 2018 00:00:45 +0000 (15 17:00 -0700)
treee4c5fac02faa38a6349b12372d31a292717dfbf1
parent8fadefd9e06c7459633b432ad4ce809116309ba0
Refactor hackfmt main to have only one Logger.exit call

Summary:
Some refactoring I did while investigating the problem that led to D9011103. When I originally added this logging, I wasn't sure how to do this nicely because I was not so conscious of the fact that `try` is an expression.

Note that this causes us to log 0 for the exit code of a successful exit rather than null. This seems like an improvement to me.

Reviewed By: arxanas

Differential Revision: D9351400

fbshipit-source-id: 5a990820bd5b5dfa8cde9b2b38806341638cfccf
hphp/hack/src/hackfmt.ml