There is flexible exception handling in Haskell?

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/
participants (1)
-
7253146@informatica.alumnos.uma.es