pyd.exception

Contains utilities for safely wrapping python exceptions in D and vice versa.

Members

Classes

PythonException
class PythonException

This simple exception class holds a Python exception.

Functions

exception_catcher
T exception_catcher(T delegate() dg)

It is intended that any functions that interface directly with Python which have the possibility of a D exception being raised wrap their contents in a call to this function, e.g.:

handle_exception
void handle_exception(string file = __FILE__, size_t line = __LINE__)

This function first checks if a Python exception is set, and then (if one is) pulls it out, stuffs it in a PythonException, and throws that exception.

Meta