Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support preCICE Exception system #173

Open
5 tasks
BenjaminRodenberg opened this issue Mar 9, 2023 · 1 comment · May be fixed by #225
Open
5 tasks

Support preCICE Exception system #173

BenjaminRodenberg opened this issue Mar 9, 2023 · 1 comment · May be fixed by #225
Labels
enhancement New feature or request

Comments

@BenjaminRodenberg
Copy link
Member

BenjaminRodenberg commented Mar 9, 2023

In precice/precice#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:

  • Cython has some support for C++ Exception, but we need to explicitly state that certain functions may throw an exception. For details see https://cython.readthedocs.io/en/latest/src/userguide/wrapping_CPlusPlus.html#exceptions.
  • 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.
@BenjaminRodenberg BenjaminRodenberg added the enhancement New feature or request label Mar 9, 2023
@BenjaminRodenberg
Copy link
Member Author

As soon as precice/precice#2065 is merged we should be able to start working on this issue.

@fsimonis fsimonis linked a pull request Nov 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant