[Haskell-cafe] Correct way to "catch all exceptions"

Michael Snoyman michael at snoyman.com
Thu Jul 11 18:57:02 CEST 2013


On Thu, Jul 11, 2013 at 6:07 PM, Felipe Almeida Lessa <
felipe.lessa at gmail.com> wrote:

> On Thu, Jul 11, 2013 at 10:56 AM, Michael Snoyman <michael at snoyman.com>
> wrote:
> > The only
> > approach that handles the situation correctly is John's separate thread
> > approach (tryAll3).
>
> I think you meant "tryAll2" here.  Got me confused for some time =).
>
> Cheers,
>
> --
> Felipe.
>

Doh, yes, I did, thanks for the clarification.

After playing around with this a bit, I was able to get an implementation
of try, catch, and handle which work for any non-async exception, in monad
transformers which are instances of MonadBaseControl (from monad-control).
I'll try to write up my thoughts in something more coherent, likely a blog
post.

Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130711/14419ead/attachment.htm>


More information about the Haskell-Cafe mailing list