throwError package:FailT

Same as exceptFailT, but works with any MonadError.
>>> throwErrorFailT (fail "A bad thing" >> pure () :: FailT String (Except FailException) ())
ExceptT (Identity (Left FailException
"A bad thing"
CallStack (from HasCallStack):
...
Version of throwErrorFailT restricted to String Same as exceptFailT, but works with any MonadError.
>>> import Control.Monad.Trans.Fail.String

>>> throwErrorFailT (fail "A bad thing" >> pure () :: FailT (Except FailException) ())
ExceptT (Identity (Left FailException
"A bad thing"
CallStack (from HasCallStack):
...
Version of throwErrorFailT restricted to Text Same as exceptFailT, but works with any MonadError.
>>> import Control.Monad.Trans.Fail.Text

>>> throwErrorFailT (fail "A bad thing" >> pure () :: FailT (Except FailException) ())
ExceptT (Identity (Left FailException
"A bad thing"
CallStack (from HasCallStack):
...