Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type t =
| Exception
| StandardError
| ArithmeticError
| LookupError
| AssertionError
| AttributeError
| EOFError
| EnvironmentError
| FloatingPointError
| IOError
| ImportError
| IndexError
| KeyError
| KeyboardInterrupt
| MemoryError
| NameError
| NotImplementedError
| OSError
| OverflowError
| ReferenceError
| RuntimeError
| SyntaxError
| SystemExit
| TypeError
| ValueError
| ZeroDivisionError
| StopIteration
Wrapper for PyErr_Clear
val exception_matches : Object.t -> bool
Wrapper for PyErr_ExceptionMatches
Wrapper for PyErr_Fetch.
Exception fetched when Py.E
has been raised.
Wrapper for PyErr_GivenExceptionMatches
val occurred : unit -> Object.t option
Wrapper for PyErr_Occurred
Wrapper for PyErr_Print
Wrapper for PyErr_PrintEx
Wrapper for PyErr_Restore
restore_tuple (ptype, pvalue, ptraceback)
is equivalent to Py.Err.restore ptype pvalue ptraceback
.
Restore the exception returned by Py.Err.fetch ()
and raise Failure
if None
.
Restore the exception returned by Py.Err.fetched ()
and raise Failure
if None
.
val set_error : t -> string -> unit
set_error e msg
calls Py.Err.set_string e msg
with a predefined error type. In a closure/method/callback, it is recommended to raise a Py.Err _
exception instead.
val set_none : Object.t -> unit
Wrapper for PyErr_SetNone
val set_string : Object.t -> string -> unit
Wrapper for PyErr_SetString
Wrapper for PyErr_SetObject. In a closure/method/callback, it is recommended to raise a Py.E _
exception instead.
Wrapper for PyErr_SetInterrupt
Since Python 3.10. Wrapper for PyErr_SetInterruptEx