lsst.pex.exceptions
8.0.0.0-23-g68b96ed
|
Defines | |
#define | declareException(NAME, PYBASE, FULLNAME) |
#define declareException | ( | NAME, | |
PYBASE, | |||
FULLNAME | |||
) |
Swig macro to generate wrappers for a custom C++ exception
[in] | NAME | Name of the exception, not including the namespace (e.g. MyCustomException). |
[in] | PYBASE | Fully-qualified Python name of the exception's base class (e.g. lsst.pex.exceptions.NotFoundError). |
[in] | FULLNAME | Fully-qualified C++ name of the exception (e.g. lsst::mypackage::MyCustomException). |
Note that the Python module that contains the base class must have been imported in the Swig-generated Python code prior to the point where this macro is invoked. Usually this is added automatically by Swig due to an %import statement, but in some cases it may need to be added manually in a %pythoncode block.
See tests/testLib.i for a complete example.