turning ExitCode into an IO exception

Is there a prefered way to convert an ExitCode to an IO exception? When running a sequence of IO actions, it is certainly best to use the same way of showing failure for all of them. However running shell commands with functions from the 'process' package shows failure by ExitCode which is different from almost all other IO actions in 'base'.

On 10 May 2010 21:02, Henning Thielemann
Is there a prefered way to convert an ExitCode to an IO exception?
The most direct way would be to use exitWith, though it feels a bit weird: http://haskell.org/ghc/docs/6.12.1/html/libraries/base-4.2.0.0/System-Exit.h... This may not be suitable if you want to be able to make exitWith calls of your own, because you won't be able to tell the exceptions apart. Cheers, Max
participants (2)
-
Henning Thielemann
-
Max Bolingbroke