[Haskell-cafe] ANN: asynchronous-exceptions

Edsko de Vries edskodevries at gmail.com
Wed Feb 5 14:43:06 UTC 2014


Be aware that "passing through" of asynchronous exceptions is not really
possible. There simply is no way to selectively catch an exception -- one
must always catch and rethrow, thus turning asynchronous exceptions into
synchronous exceptions. See http://www.edsko.net/2013/06/11/throwto/ for
details.

Edsko


On Wed, Feb 5, 2014 at 11:23 AM, Roman Cheplyaka <roma at ro-che.info> wrote:

> It is often useful to distinguish between synchronous and asynchronous
> exceptions. The common idiom is to run a user-supplied computation
> catching any synchronous exceptions but allowing asynchronous exceptions
> (such as user interrupt) pass through.
>
> base 4.7 (shipped with GHC 7.8) will have SomeAsyncException type that
> solves this problem.
>
> asynchronous-exceptions is a new package that serves two purposes:
> * provide compatibility with older `base` versions that lack the
>   `SomeAsyncException` type
> * define convenient functions for catching only synchronous exceptions
>
> Roman
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140205/a60cf786/attachment.html>


More information about the Haskell-Cafe mailing list