try, -- :: IO a -> IO (Either Exception a)
tryJust, -- :: (Exception -> Maybe b) -> a -> IO (Either b a)
ignoreExceptions,
+ onException,
-- ** The @evaluate@ function
evaluate, -- :: a -> IO a
ignoreExceptions :: IO () -> IO ()
ignoreExceptions io = io `catchAny` \_ -> return ()
+onException :: IO a -> IO () -> IO a
+onException io what = io `catch` \e -> do what
+ throw (e :: SomeException)
+
-----------------------------------------------------------------------------
-- Some Useful Functions