[ ] Start with a single base exception precice.Error
[ ] Define our own exception system for more fine-grained errors (basically map thrown C++ preCICE exceptions to python exceptions). We should use larger python Frameworks as a template here (numpy, for example, also defines its own exceptions)
[ ] We should also make sure to be able to catch unknown exceptions (imagine C++ preCICE introduces a FooError upstream, then we want to at least raise a generic precice.Error here until we implement precice.FooError)
[ ] We should also add (some) tests for error handling. I think we can simply extend our mocked version of preCICE with some dummy exceptions and explicitly test for them to make sure that passing the error generally works.
In https://github.com/precice/precice/pull/1594 we are currently introducing an exception system for preCICE. We should also support this in the python bindings.
Some necessary steps that I see here:
precice.Error
FooError
upstream, then we want to at least raise a genericprecice.Error
here until we implementprecice.FooError
)