lsst.pex.exceptions  15.0-1-g14e9bfd
Functions
lsst::pex::exceptions::python Namespace Reference

Functions

template<typename T , typename E = lsst::pex::exceptions::Exception>
pybind11::class_< T > declareException (pybind11::module &mod, const std::string &name, const std::string &base)
 Helper function for pybind11, used to define new types of exceptions. More...
 

Function Documentation

◆ declareException()

template<typename T , typename E = lsst::pex::exceptions::Exception>
pybind11::class_<T> lsst::pex::exceptions::python::declareException ( pybind11::module &  mod,
const std::string name,
const std::string base 
)

Helper function for pybind11, used to define new types of exceptions.

Parameters
[in]modModule to insert the exception into.
[in]nameName of the exception in the module.
[in]basePython name of base class (from pex exceptions).

While this function creates the class wrapper, the user is still responsible for adding all constructor and member wrappers to the returned py::class_ object.

Definition at line 47 of file Exception.h.