Skip to content

Conversation

@fsimonis
Copy link
Member

@fsimonis fsimonis commented Nov 25, 2024

This PR adds exception support for the entire API.

Note that both const and except are incompatible, hence I had to remove the const member specifiers from the API.
This shouldn't be a problem as const is purely decorative as there is no const usage in python.

This implementation translates all exceptions into RuntimeErrors on the python side. We could provide a custom Error as part of the precice module to make this cleaner.

Closes #173

@fsimonis fsimonis requested a review from IshaanDesai November 25, 2024 10:27
@fsimonis fsimonis self-assigned this Nov 25, 2024
@fsimonis fsimonis added the enhancement New feature or request label Nov 25, 2024
@IshaanDesai IshaanDesai added this to the v3.2.0 milestone Mar 18, 2025
@BenjaminRodenberg BenjaminRodenberg requested review from BenjaminRodenberg and removed request for IshaanDesai March 18, 2025 10:05
Copy link
Member

@BenjaminRodenberg BenjaminRodenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I manually tested how Participant and get_mesh_vertices behaves for faulty input and it looks good to me.

Ideally, we would also test for exceptions in the automated testing. But I do not really see how we can realize this without re-implementing the whole exception mechanism in the mocked preCICE. So let's not do it.

@fsimonis Feel free to merge.

@fsimonis fsimonis merged commit aaa8b75 into develop Mar 18, 2025
@fsimonis fsimonis deleted the add-exception-support branch March 18, 2025 12:40
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 this pull request may close these issues.

Support preCICE Exception system

4 participants