cardano-cli
Safe HaskellNone
LanguageHaskell2010

Cardano.CLI.Compatible.Exception

Synopsis

Documentation

type CIO e a = HasCallStack => RIO e a Source #

Type alias that enforces the presence of a call stack.

data CustomCliException where Source #

Custom exception type for CLI commands. Any custom errors created in `cardano-cl` should be wrapped in this exception type.

Constructors

CustomCliException :: forall err. (HasCallStack, Show err, Typeable err, Error err) => err -> CustomCliException 

throwCliError :: (HasCallStack, Show e, Typeable e, Error e, MonadIO m) => e -> m a Source #

Wrapper function which allows throwing of types of instance Error, attaching call stack from the call site

fromEitherCli :: forall e m a. (HasCallStack, MonadIO m, Show e, Typeable e, Error e) => Either e a -> m a Source #

fromEitherIOCli :: forall e m a. (HasCallStack, MonadIO m, Show e, Typeable e, Error e) => IO (Either e a) -> m a Source #

fromExceptTCli :: forall e m a. (HasCallStack, MonadIO m, Show e, Typeable e, Error e) => ExceptT e IO a -> m a Source #