Copyright | [2016] Trevor L. McDonell |
---|---|
License | BSD |
Safe Haskell | None |
Language | Haskell2010 |
Error handling
- data Status
- describe :: Status -> String
- resultIfOk :: (Status, a) -> IO a
- nothingIfOk :: Status -> IO ()
- nvvmError :: String -> a
- nvvmErrorIO :: String -> IO a
- requireSDK :: Name -> Double -> a
Documentation
NVVM API function return code
resultIfOk :: (Status, a) -> IO a Source #
Return the result of a function on successful execution, otherwise throw an exception.
nothingIfOk :: Status -> IO () Source #
Throw an exception on an unsuccessful return code
nvvmError :: String -> a Source #
Throw an exception. Exceptions may be thrown from pure code, but can only
be caught in the IO
monad.
requireSDK :: Name -> Double -> a Source #
A specially formatted error message