There is flexible exception handling in Haskell?
7253146 at informatica.alumnos.uma.es
7253146 at informatica.alumnos.uma.es
Mon Nov 17 22:46:43 EST 2003
Hi all. I am porting to Haskell a small zlib-based library for .zip files (I
have not seen any released package for it, although it should very useful). The
matters come when I try to address exceptional conditions: all the library
functions return a integer code with OK/SOMEERROR meaning. The most natural way
to carry the exceptional situations should be raise IO exceptions, but here
comes the problem: how can I define new Exception codes, instead of raising
userError all the time? I think it makes sense for a library to raise
specialized exceptions, instead of userErrors.
There is such a mechanism? Can someone help?
Thanks.
---------------------------------------------
Este mensaje lo ha enviado un Alumno de la Universidad de Malaga.
http://www.alumnos.uma.es/
More information about the Haskell-Cafe
mailing list