-
Notifications
You must be signed in to change notification settings - Fork 17
Better error handling #6
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
Comments
I often roll-my-own error stack, which is a pain, but let's you pass it in to elemental and pure procedures. It would be nice to have at least a pre-defined object with similar capabilities---something that can carry around state and provenance of errors so that computationally intensive code regions can remain pure/elemental etc. and don't need to interact or abort on errors, but can pass back meta data about when and where an error occurred. Also, the |
Relevant: https://j3-fortran.org/doc/year/19/19-224.pdf I am not convinced that the proposed solution is a step in the right direction. Specifically:
This approach necessarily implies that every statement runs (internally) in an Further, the example (Section 6) seems to me as verbose as if it was handled with C-style exception handling, but with new syntax for the programmer to learn. |
@milancurcic yes, the most common objection from the committee is that exception handling like that can easily cause missed optimization opportunities, and thus any proposal that could be put forward should not hamper performance. The syntax issue you mention is also a problem. Another issue is what kind of exceptions should be handled, and whether floating point exceptions fall in that category. |
A common request is to improve how error handling is done.
Whether exceptions, or some other mechanism.
The text was updated successfully, but these errors were encountered: