lsst.pex.exceptions  8.0.0.0-23-g68b96ed
Defines
doc/mainpage.dox File Reference

Defines

#define declareException(NAME, PYBASE, FULLNAME)

Define Documentation

#define declareException (   NAME,
  PYBASE,
  FULLNAME 
)

Swig macro to generate wrappers for a custom C++ exception

Note:
This is actually a Swig macro "%declareExceptions" (note the "%") defined in exceptionsLib.i, but we've lied to Doxygen about its name and location to produce this documentation.
Parameters:
[in]NAMEName of the exception, not including the namespace (e.g. MyCustomException).
[in]PYBASEFully-qualified Python name of the exception's base class (e.g. lsst.pex.exceptions.NotFoundError).
[in]FULLNAMEFully-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.

 All Classes Namespaces Files Functions Variables Typedefs Friends Defines