lsst.pex.exceptions gde069b70e5+7589c3a021
Functions
lsst::pex::exceptions::python Namespace Reference

Functions

template<typename T , typename E = lsst::pex::exceptions::Exception>
pybind11::class_< T, E > 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, E > 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.

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.

Template Parameters
TThe C++ exception to wrap.
EThe C++ base class of T.
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).

Definition at line 52 of file Exception.h.