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

Better error message if a ReactionMethod fails at runtime, including @generated dispatch #139

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sjdaines
Copy link
Member

@sjdaines sjdaines commented Nov 28, 2024

Catch runtime exception if a ReactionMethod fails, and print an error message containing tje name of the failed Reaction as in the YAML config file. This is helpful if there are multiple instances of the same Reaction and it's not clear which one is failing.

Second commit also implements exception handling for the generated_dispatch=true case, but this slows down compile by ~20% so not recommended

See #140 for PR with just the generated_dispatch=false case (the first commit of this PR)

Catch runtime exception if a ReactionMethod fails, and print an
error message containing tje name of the failed Reaction as in the YAML
config file. This is helpful if there are multiple instances of the same Reaction
and it's not clear which one is failing.

NB: requires 'generated_dispatch=false' argument to PALEOmodel.initialize!
@sjdaines sjdaines changed the title Better error message if a ReactionMethod fails at runtime Better error message if a ReactionMethod fails at runtime, including @generated dispatch Nov 29, 2024
@sjdaines sjdaines marked this pull request as draft November 29, 2024 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant