[Haskell-cafe] Idiomatic error handling in Haskell

Rouan van Dalen rvdalen at yahoo.co.uk
Wed Mar 2 12:35:24 CET 2011

There are quite a few exception handling mechanisms provided by Haskell,
as can be seen from this post: 

I would like to know what is the preferred Haskell mechanism for handling 
exceptions in
the IO monad?  I am not concerned with mechanisms such as Maybe / Either, but 
would like
to know about exception mechanisms inside the IO monad.

The 2 I know of are:
  o) throwDyn 
  o) ioError and catch

I do need the exceptions to be extendable.  So which is the preferred way
to handle exceptions in Haskell for new libs?


More information about the Haskell-Cafe mailing list