neovimhaskell / nvim-hs

Neovim API for Haskell plugins as well as the plugin provider
Other
267 stars 18 forks source link

Remove mechanism suppressing exceptions from RPC calls #95

Closed saep closed 2 years ago

saep commented 2 years ago

Instead of calling error with an unhelpful message, simply throw the NeovimException. The method, which has thrown the excpetion, has been added to the exception object.

A helper function catchNeovimException has been added which is simply a specialization of the normal catch.

The unhelpful error message was a remnant of a refactor which removed error types from the remote functions because all remote functions can fail.

See #94