Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make Watchman.call_on_instance callbacks return a result
Summary: this stack converts all of the functions in watchman.ml to return results instead of throwing exceptions, so that we can ensure we handle all the error cases. during the transition, we will call `raise_error` to maintain exception behavior, but eventually thread the `result` further and further up and eliminate `try/with`'s. this is starting to get to the meat of this stack. `call_on_instance` catches most of the exceptions raised by `raise_error` and marks the watchman instance as dead so it can be retried. this diff sets us up to get rid of the `catch` and instead just handle the `result`. Reviewed By: nmote Differential Revision: D28173783 fbshipit-source-id: 2817f87f3e84e121bc1f4de6bf9ddc1dbcf5569b
- Loading branch information