module Python.Exceptions.ExcTypes
(
arithmeticError,
assertionError,
attributeError,
pyEOFError,
environmentError,
pyMainException,
floatingPointError,
pyIOError,
importError,
indexError,
keyError,
keyboardInterrupt,
lookupError,
memoryError,
nameError,
notImplementedError,
pyOSError,
overflowError,
referenceError,
runtimeError,
standardError,
syntaxError,
systemError,
systemExit,
typeError,
valueError,
zeroDivisionError
)
where
import Python.Types
import Python.Objects
import System.IO.Unsafe
import Python.Utils
import Foreign hiding (unsafePerformIO)
exctypes_internal_e :: IO (Ptr CPyObject) -> IO PyObject
exctypes_internal_e f = do p <- f
fp <- newForeignPtr_ p
return $ PyObject fp
arithmeticError = unsafePerformIO $ exctypes_internal_e cArithmeticError
assertionError = unsafePerformIO $ exctypes_internal_e cAssertionError
attributeError = unsafePerformIO $ exctypes_internal_e cAttributeError
pyEOFError = unsafePerformIO $ exctypes_internal_e cEOFError
environmentError = unsafePerformIO $ exctypes_internal_e cEnvironmentError
pyMainException = unsafePerformIO $ exctypes_internal_e cException
floatingPointError = unsafePerformIO $ exctypes_internal_e cFloatingPointError
pyIOError = unsafePerformIO $ exctypes_internal_e cIOError
importError = unsafePerformIO $ exctypes_internal_e cImportError
indexError = unsafePerformIO $ exctypes_internal_e cIndexError
keyError = unsafePerformIO $ exctypes_internal_e cKeyError
keyboardInterrupt = unsafePerformIO $ exctypes_internal_e cKeyboardInterrupt
lookupError = unsafePerformIO $ exctypes_internal_e cLookupError
memoryError = unsafePerformIO $ exctypes_internal_e cMemoryError
nameError = unsafePerformIO $ exctypes_internal_e cNameError
notImplementedError = unsafePerformIO $ exctypes_internal_e cNotImplementedError
pyOSError = unsafePerformIO $ exctypes_internal_e cOSError
overflowError = unsafePerformIO $ exctypes_internal_e cOverflowError
referenceError = unsafePerformIO $ exctypes_internal_e cReferenceError
runtimeError = unsafePerformIO $ exctypes_internal_e cRuntimeError
standardError = unsafePerformIO $ exctypes_internal_e cStandardError
syntaxError = unsafePerformIO $ exctypes_internal_e cSyntaxError
systemError = unsafePerformIO $ exctypes_internal_e cSystemError
systemExit = unsafePerformIO $ exctypes_internal_e cSystemExit
typeError = unsafePerformIO $ exctypes_internal_e cTypeError
valueError = unsafePerformIO $ exctypes_internal_e cValueError
zeroDivisionError = unsafePerformIO $ exctypes_internal_e cZeroDivisionError
foreign import ccall unsafe "excglue.h hspy_ArithmeticError"
cArithmeticError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_AssertionError"
cAssertionError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_AttributeError"
cAttributeError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_EOFError"
cEOFError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_EnvironmentError"
cEnvironmentError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_Exception"
cException :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_FloatingPointError"
cFloatingPointError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_IOError"
cIOError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_ImportError"
cImportError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_IndexError"
cIndexError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_KeyError"
cKeyError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_KeyboardInterrupt"
cKeyboardInterrupt :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_LookupError"
cLookupError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_MemoryError"
cMemoryError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_NameError"
cNameError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_NotImplementedError"
cNotImplementedError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_OSError"
cOSError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_OverflowError"
cOverflowError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_ReferenceError"
cReferenceError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_RuntimeError"
cRuntimeError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_StandardError"
cStandardError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_SyntaxError"
cSyntaxError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_SystemError"
cSystemError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_SystemExit"
cSystemExit :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_TypeError"
cTypeError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_ValueError"
cValueError :: IO (Ptr CPyObject)
foreign import ccall unsafe "excglue.h hspy_ZeroDivisionError"
cZeroDivisionError :: IO (Ptr CPyObject)