Python: Test Catch User Errors#172
Merged
ax3l merged 1 commit intoBLAST-ImpactX:developmentfrom Sep 13, 2022
Merged
Conversation
ax3l
commented
Jul 23, 2022
a13c0b5 to
bcc1406
Compare
RTSandberg
approved these changes
Jul 28, 2022
Contributor
RTSandberg
left a comment
There was a problem hiding this comment.
I don't see why this wouldn't pass but it looks good to me
94898fb to
013245c
Compare
ax3l
commented
Sep 1, 2022
| // check for validity of arguments | ||
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE(argd > 0.0_prt, "invalid ptd arg (<=0)"); | ||
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE(arg > 0.0_prt, "invalid pt arg (<=0)"); | ||
| AMREX_ASSERT_WITH_MESSAGE(argd > 0.0_prt, "invalid ptd arg (<=0)"); |
Member
Author
There was a problem hiding this comment.
Moved to debug-only because this is in a kernel as part of a hot loop.
23b2144 to
8eac9d2
Compare
8eac9d2 to
b7f534e
Compare
5 tasks
Member
Author
|
ah, got ya: AMReX-Codes/amrex#2944 |
1 task
b7f534e to
55aa2e9
Compare
Test multiple possible usage errors from Python. We want to make sure that these errors throw exceptions and do not abort/terminate the Python process. That way, the user-experience in IPython/Jupyter notebooks will be better (no session restart needed).
55aa2e9 to
616b33a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test multiple possible usage errors from Python. We want to make sure that these errors throw exceptions and do not abort/terminate the Python process. That way, the user-experience in IPython/Jupyter notebooks will be better (no session restart needed).