serokell-util-0.10.0: General-purpose functions by Serokell

Safe HaskellNone
LanguageHaskell2010

Serokell.Util.Exceptions

Contents

Description

Bitgram's general-purpose exceptions. They may be useful when you need a simple instance of Exception (e. g. in MonadThrow context)

Synopsis

Documentation

newtype TextException Source #

Use this type if you are sure that text description is enough to represent error

Constructors

TextException 

Fields

data EmptyException Source #

Use this type if you want to signal about error and there may be only one reason for it

Constructors

EmptyException 

eitherToFail :: (Monad m, e ~ SomeException) => Either e a -> m a Source #

Convert MonadThrow to arbitrary monad using fail to report error Useful when you have MonadThrow and want to use it in another monad context which uses fail for errors

Orphan instances

Buildable SomeException Source # 
Instance details