| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
Hedgehog.Internal.Exception
- newtype TypedException = TypedException SomeException
- tryAll :: MonadCatch m => m a -> m (Either TypedException a)
Documentation
newtype TypedException Source #
Newtype for SomeException with a Show instance that only contains
valid Haskell 98 tokens and also includes the type of the exception.
For example, when catching the exception thrown by fail "foo" :: IO ()
and calling show:
IOException "user error (foo)"
Having access to the type can be useful when trying to track down the source of an exception.
Constructors
| TypedException SomeException |
Instances
tryAll :: MonadCatch m => m a -> m (Either TypedException a) Source #