Safe Haskell | None |
---|---|
Language | Haskell2010 |
- catchWithContext :: (MonadCatch m, Exception e) => m a -> (ErrorWithContext e -> m a) -> m a
- catchWithoutContext :: forall a e m. (MonadCatch m, Exception e) => m a -> (e -> m a) -> m a
- tryAnyWithContext :: MonadCatch m => m a -> m (Either (ErrorWithContext SomeException) a)
- tryAnyWithoutContext :: MonadCatch m => m a -> m (Either SomeException a)
- tryWithContext :: (MonadCatch m, Exception e) => m a -> m (Either (ErrorWithContext e) a)
- tryWithoutContext :: (MonadCatch m, Exception e) => m a -> m (Either e a)
- errorContextForget :: ErrorWithContext e -> e
- catchAnyWithContext :: MonadCatch m => m a -> (ErrorWithContext SomeException -> m a) -> m a
- catchAnyWithoutContext :: MonadCatch m => m a -> (SomeException -> m a) -> m a
Documentation
catchWithContext :: (MonadCatch m, Exception e) => m a -> (ErrorWithContext e -> m a) -> m a Source #
Like catch
, but the handler is required to be context-aware. Is
also able to catch exceptions of type e
(without context).
catchWithoutContext :: forall a e m. (MonadCatch m, Exception e) => m a -> (e -> m a) -> m a Source #
Like catch
, but the handler is required to be context-unaware.
Is also able to catch exceptions with context, in which case the
context will be forgotten before the exception will be provided to
the handler.
tryAnyWithContext :: MonadCatch m => m a -> m (Either (ErrorWithContext SomeException) a) Source #
tryAnyWithoutContext :: MonadCatch m => m a -> m (Either SomeException a) Source #
tryWithContext :: (MonadCatch m, Exception e) => m a -> m (Either (ErrorWithContext e) a) Source #
tryWithoutContext :: (MonadCatch m, Exception e) => m a -> m (Either e a) Source #
errorContextForget :: ErrorWithContext e -> e Source #
Forgets the context from an enriched error.
catchAnyWithContext :: MonadCatch m => m a -> (ErrorWithContext SomeException -> m a) -> m a Source #
Context aware version of catchAny
.
catchAnyWithoutContext :: MonadCatch m => m a -> (SomeException -> m a) -> m a Source #
Context aware version of catchAny
.