Win32-package and Windows error codes in exceptions

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Win32-package and Windows error codes in exceptions

Esa Ilari Vuokko


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

Haskell-Cafe mailing list
[hidden email]