Closed kazu-yamamoto closed 3 years ago
The problem here is that Kill
is not properly defined as an async exception, and therefore is incurring the wrapper type. The best way to solve this is to provide an Exception
instance of Kill
that makes Kill
a child of SomeAsyncException
.
Adding the following works well:
fromException = asyncExceptionFromException
toException = asyncExceptionToException
Thanks!
@snoyberg It might be worth re-exporting asyncExceptionFromException
and asyncExceptionToException
from UnliftIO.Exception
.
Done!
Lovely! Thanks.
80 introduced
catchSyncOrAsync
andhandleSyncOrAsync
. It works well if a handler tries to catchSomeExeption
. However, if the type of an asynchronous exception is specified, it does not catch it. This is probably because they do not take care of the async wrapper.