pyml

OCaml bindings for Python
IN THIS PACKAGE
Module Py . Err
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
val clear : unit -> unit

Wrapper for PyErr_Clear

val exception_matches : Object.t -> bool
val fetch : unit -> (Object.t * Object.t * Object.t) option

Wrapper for PyErr_Fetch.

val fetched : unit -> (Object.t * Object.t * Object.t) option

Exception fetched when Py.E has been raised.

val given_exception_matches : Object.t -> Object.t -> bool
val occurred : unit -> Object.t option

Wrapper for PyErr_Occurred

val print : unit -> unit

Wrapper for PyErr_Print

val print_ex : int -> unit

Wrapper for PyErr_PrintEx

val restore : Object.t -> Object.t -> Object.t -> unit

Wrapper for PyErr_Restore

val restore_tuple : (Object.t * Object.t * Object.t) -> unit

restore_tuple (ptype, pvalue, ptraceback) is equivalent to Py.Err.restore ptype pvalue ptraceback.

val restore_fetch : unit -> unit

Restore the exception returned by Py.Err.fetch () and raise Failure if None.

val restore_fetched : unit -> unit

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

val set_object : Object.t -> Object.t -> unit

Wrapper for PyErr_SetObject. In a closure/method/callback, it is recommended to raise a Py.E _ exception instead.