[Haskell-cafe] Win32-package and Windows error codes in exceptions

Esa Ilari Vuokko eivuokko at gmail.com
Mon Aug 28 06:09:31 EDT 2006


Hi,

Recently, I've been annoyed how Win32-package throws user errors, ie String,
on failures.  The System.Win32-being rather low level, it often makes sense
for caller to catch some specific errors.

I don't really understand how, or if, I could extend System.IO.Error.  unix-
package uses it via Foreign.C.Error, which makes me wonder if the underlying
functionality in there should be extended.

Is the only or best choice to go for Dynamic exceptions?  That introduces a
subtle difference for (already existing) programs that rely on exceptions
to be presentable via Show and default handler.

Best regards,
--Esa Ilari Vuokko



More information about the Haskell-Cafe mailing list