Copyright | (c) Pawel Nosal 2021 |
---|---|
License | MIT |
Maintainer | p.nosal1986@gmail.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Extensions |
|
This module provide an assertion for check if expected Exception has been throw by IO action.
Synopsis
- anyException :: ExceptionSelector SomeException
- anyIOException :: ExceptionSelector IOException
- exceptionOfType :: Exception e => ExceptionSelector e
- type ExceptionSelector a = a -> a
Exception selectors
anyException :: ExceptionSelector SomeException Source #
Select all exceptions.
anyIOException :: ExceptionSelector IOException Source #
Select all IOException.
exceptionOfType :: Exception e => ExceptionSelector e Source #
Select all an Exception of given type.
This selector should be used with TypeApplications
data MyException = ThisException | ThatException deriving (Show) instance Exception MyException selectMyException = exceptionType @MyException
Exception selector type
type ExceptionSelector a = a -> a Source #