throwError -package:dbus

Is used within a monadic computation to begin exception processing.
Is used within a monadic computation to begin exception processing.
Throw an error of type e with show as a display function.
Throw an error, escaping the current computation up to the nearest catchError (if any).
runThrow (throwError e >>= k) = runThrow (throwError e)
Throw an exception in an effectful computation. The type is inferred.
Throws an error carrying information of type e :: *.
Begin error processing for the error of type option. This is Control.Monad.Except's throwError with the type adjusted for better compatibility with CoHas.
Throws a StatusCodeException wrapped in HttpExceptionRequest, if the response's status code indicates an error (if it isn't 2xx). This can be used to implement checkResponse.
Throw an error of type e and specify a display function in case a third-party code catches the internal exception and shows it.
Throw an error of type e with no display function.
Converts a Lua error at the top of the stack into a Haskell exception and throws it.
Throw an exception in an effectful computation. The type is unit, which suppresses the ghc-mod warning "A do-notation statement discarded a result of type"
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):
...
Throw a parser error with an additional path.
Run a computation until it produces an exception, and convert and throw that exception in a new context.
If the cancellable is cancelled, throws a GError to notify that the operation was cancelled.