error stops execution and displays an error message.
An error replacement with call-site metadata.
This philosophy behind this package is that it is often better to find out all of the errors that have occured in a computation and report them simultaneously, rather than aborting as soon as the first error is encountered. Towards this end, this module supplies a type of combinable error messages so that all of the errors from subcomputations can be gathered and presented together.
New in version 1.1: Removed Monoid instance for Doc (it should now be supplied by ansi-wl-pprint), added ErrorMessageOr type alias.
Prior to base-22.214.171.124 there was no Eq instance for ErrorCall. This package provides an orphan instance.
Extracts the list of error messages from the parse error
Extracts the source position from the parse error
When an error occurs, it is recorded in this state variable and no further errors are recorded. Reading errors returns the currently recorded errors (there may be more than one due to a possibly distributed implementation) and resets the state variable to , re-enabling the recording of future errors. The value  means that there has been no detectable error since the last time errors was read, or since the GL was initialized.
The one-stop shop for all your error-handling needs! Just import Control.Error.
This library encourages an error-handling style that directly uses the type system, rather than out-of-band exceptions.
C-specific Marshalling support: Handling of C "errno" error codes.
Routines for testing return values and raising a userError exception in case of values indicating an error state.
Standard IO Errors.
* Computation type: Computations which may fail or throw exceptions.
* Binding strategy: Failure records information about the cause/location of the failure. Failure values bypass the bound function, other values are used as inputs to the bound function.
* Useful for: Building computations from sequences of functions that may fail or using exception handling to structure error handling.
* Zero and plus: Zero is represented by an empty error and the plus operation executes its second argument if the first fails.
* Example type: Either String a
The Error monad (also called the Exception monad).
Types and functions for dealing with encoding and decoding errors in Unicode text.
The standard functions for encoding and decoding text are strict, which is to say that they throw exceptions on invalid input. This is often unhelpful on real world input, so alternative functions exist that accept custom handlers for dealing with invalid inputs. These OnError handlers are normal Haskell functions. You can use one of the presupplied functions in this module, or you can write a custom handler of your own.
An exception to be thrown.
Minimal complete definition: noMsg or strMsg.
Show more results