catches ... [ handler _AssertionFailed (s -> print $ "Assertion Failed\n" ++ s) , handler _ErrorCall (s -> print $ "Error\n" ++ s) ]This works ith both the Handler type provided by Control.Exception:
handler :: Getter SomeException a -> (a -> IO r) -> Handler r handler :: Fold SomeException a -> (a -> IO r) -> Handler r handler :: Prism' SomeException a -> (a -> IO r) -> Handler r handler :: Lens' SomeException a -> (a -> IO r) -> Handler r handler :: Traversal' SomeException a -> (a -> IO r) -> Handler rand with the Handler type provided by Control.Monad.Catch:
handler :: Getter SomeException a -> (a -> m r) -> Handler m r handler :: Fold SomeException a -> (a -> m r) -> Handler m r handler :: Prism' SomeException a -> (a -> m r) -> Handler m r handler :: Lens' SomeException a -> (a -> m r) -> Handler m r handler :: Traversal' SomeException a -> (a -> m r) -> Handler m rand with the Handler type provided by Control.Monad.Error.Lens:
handler :: Getter e a -> (a -> m r) -> Handler e m r handler :: Fold e a -> (a -> m r) -> Handler e m r handler :: Prism' e a -> (a -> m r) -> Handler e m r handler :: Lens' e a -> (a -> m r) -> Handler e m r handler :: Traversal' e a -> (a -> m r) -> Handler e m r
catches ... [ handler_ _NonTermination (return "looped") , handler_ _StackOverflow (return "overflow") ]This works with the Handler type provided by Control.Exception:
handler_ :: Getter SomeException a -> IO r -> Handler r handler_ :: Fold SomeException a -> IO r -> Handler r handler_ :: Prism' SomeException a -> IO r -> Handler r handler_ :: Lens' SomeException a -> IO r -> Handler r handler_ :: Traversal' SomeException a -> IO r -> Handler rand with the Handler type provided by Control.Monad.Catch:
handler_ :: Getter SomeException a -> m r -> Handler m r handler_ :: Fold SomeException a -> m r -> Handler m r handler_ :: Prism' SomeException a -> m r -> Handler m r handler_ :: Lens' SomeException a -> m r -> Handler m r handler_ :: Traversal' SomeException a -> m r -> Handler m rand with the Handler type provided by Control.Monad.Error.Lens:
handler_ :: Getter e a -> m r -> Handler e m r handler_ :: Fold e a -> m r -> Handler e m r handler_ :: Prism' e a -> m r -> Handler e m r handler_ :: Lens' e a -> m r -> Handler e m r handler_ :: Traversal' e a -> m r -> Handler e m r