Typically async libs complect an error semi-monad with their async semi-monad (JS Promise, Promesa, Manifold). This error handling is essentially async exceptions, and not hooking into it means that we only handle exceptions and put them into :error in synchronous usage.
This branch adds a catch method to the AsyncContext protocol, which maps directly to the aforementioned async library error handling.
Some async abstractions like futures and core.async channels have no such error handling strategy. The proposal here is to treat the future or channel yielding an Exception/js/Error as an async throw. This could be removed if the jury is so inclined, making the AsyncContext/catch implementation on those types a no-op.
A lot of tests are included here, but they are simply analogous to the sync exception catching tests.
BTW removes the Figwheel test runner obsoleted by #22.
Fixes #11
:error
in synchronous usage.catch
method to theAsyncContext
protocol, which maps directly to the aforementioned async library error handling.Exception
/js/Error
as an async throw. This could be removed if the jury is so inclined, making theAsyncContext/catch
implementation on those types a no-op.