-
-
Notifications
You must be signed in to change notification settings - Fork 469
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
Errors should be raised, not returned. #7535
Comments
comment:2
See also #7532. |
comment:4
This should do the trick. |
Makes all remaining returns of exceptions into raising. |
comment:5
Attachment: trac_7535-errors-raise.patch.gz I'm not sure what you mean by "remaining", since there is no patch at #7532 (or elsewhere?) fixing any other instances of this. I'm attaching a patch dealing with two more of these, leaving, I think, just the one in rings.pyx. See #7532 for that one. Positive review for timdumol's patch, so if mine is okay, this whole ticket can get a positive review. |
Reviewer: John Palmieri |
Author: Tim Dumol |
apply on top of the other patch |
comment:6
Attachment: trac_7535-part2.patch.gz I am about to add a patch to #7532 which fixes (for me) the remaining issue in schemes/elliptic_curves. |
comment:7
Doctests pass with the latter patch and the one in #7532, so I'll mark both as positive review. |
Merged: sage-4.3.2.alpha0 |
comment:8
Merged in this order:
|
The following issue was considered in at least two threads, the latest at http://groups.google.com/group/sage-devel/browse_thread/thread/3661fde739474fdb.
There are several places in the Sage code where errors are not raised but returned. A hopefully exhaustive search brought up the following:
Of course, if an error is returned it can't be catched, which implies obvious problems.
I have no idea what component that ticket should be associated with. "Performance" seemed the least inappropriate description to me.
Is there any of the above cases in which the error should really be returned, not raised?
Component: misc
Keywords: error return
Author: Tim Dumol
Reviewer: John Palmieri
Merged: sage-4.3.2.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/7535
The text was updated successfully, but these errors were encountered: