Feature #3034

Updated by Eric Irrgang 3 months ago

@libgmxapi@ can throw exceptions derived from @gmxapi::Exception@, defined in the gmxapi/exceptions.h installed header. These exceptions should have bindings in the gmxapi Python package (in the @_gmxapi@ C++ extension module) so that they are easily catchable from Python.

Exceptions defined in the @_gmxapi@ module should derive from @gmxapi::Exception@.

Users A trampoline class should establish the shared inheritance and extensibility of the Python package should be able to use @gmxapi.exceptions.Error@ as a catch-all base exception.

Developer documentation should describe how exceptions propagate and how they are catchable in both directions between Python and C++, with explanations of caveats for exceptions originating in different binaries or Python packages.

Also reference prior discussion at