| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cardano.Wasm.ExceptionHandling
Synopsis
- data ExpectedJustException = HasCallStack => ExpectedJustException String
- data ExpectedRightException = HasCallStack => ExpectedRightException String
- data CustomException = HasCallStack => CustomException String
- throwError :: (HasCallStack, MonadThrow m) => String -> m a
- justOrError :: (HasCallStack, MonadThrow m) => String -> Maybe a -> m a
- rightOrError :: (HasCallStack, MonadThrow m, Show e) => Either e a -> m a
- toMonadFail :: (Exception e, MonadFail m) => Either e a -> m a
Documentation
data ExpectedJustException Source #
Constructors
| HasCallStack => ExpectedJustException String |
Instances
data ExpectedRightException Source #
Constructors
| HasCallStack => ExpectedRightException String |
Instances
data CustomException Source #
Constructors
| HasCallStack => CustomException String |
Instances
| Exception CustomException Source # | |
Defined in Cardano.Wasm.ExceptionHandling Methods toException :: CustomException -> SomeException Source # fromException :: SomeException -> Maybe CustomException Source # | |
| Show CustomException Source # | |
Defined in Cardano.Wasm.ExceptionHandling | |
throwError :: (HasCallStack, MonadThrow m) => String -> m a Source #
justOrError :: (HasCallStack, MonadThrow m) => String -> Maybe a -> m a Source #
rightOrError :: (HasCallStack, MonadThrow m, Show e) => Either e a -> m a Source #