sdp-0.2: Simple Data Processing
Copyright(c) Andrey Mulik 2019
LicenseBSD-style
Maintainerwork.a.mulik@gmail.com
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Control.Exception.SDP

Description

Control.Exception.SDP - service module that provide some useful exceptions. Note that SDP.SafePrelude doesn't export this module.

Synopsis

Exports

Exceptions

data UnreachableException Source #

A UnreachableException is used as an exception that should never be thrown.

  • ErrorCall and AssertionFailed means that the function is partially defined or missused (if some arguments shouldn't be passed).
  • UnreachableException means that some expression, by definition, cannot be reached (for example, a default value when initializing an array, if each value is guaranteed to be overwritten before use).

data IndexException Source #

IndexException replaces the less informative ArrayException and has more neutral names.

Exception constructors are specified in the order of definition, this is the recommended check order.

If the error type may depend on the check order, it should be indicated in the documentation. For example: overflow is checked first, and then underflow. But if an overflow is detected, underflow may not be noticed.