stop using RuntimeError #639

Closed
opened 2009-02-22 23:19:46 +00:00 by warner · 1 comment

I've had the unfortunate habit of using RuntimeError whenever I needed to raise an exception and couldn't find a better one to use. David Reid points out that RuntimeError is really meant to indicate internal problems in the Python runtime, like out-of-memory or internal assertion failures.

So the task is to find all instances of RuntimeError and replace them with better exception classes, creating new-and-informative ones if necessary. Also, remind myself to stop using RuntimeError in the future.

I've had the unfortunate habit of using RuntimeError whenever I needed to raise an exception and couldn't find a better one to use. David Reid points out that RuntimeError is really meant to indicate internal problems in the Python runtime, like out-of-memory or internal assertion failures. So the task is to find all instances of RuntimeError and replace them with better exception classes, creating new-and-informative ones if necessary. Also, remind myself to stop using RuntimeError in the future.
warner added the
code
major
defect
1.3.0
labels 2009-02-22 23:19:46 +00:00
warner added this to the undecided milestone 2009-02-22 23:19:46 +00:00
warner self-assigned this 2009-02-22 23:19:46 +00:00
Author

Fixed, by changeset:d95b01a214b0acb1 through changeset:247c23904c4383a6.

Fixed, by changeset:d95b01a214b0acb1 through changeset:247c23904c4383a6.
warner added
minor
fixed
and removed
major
labels 2009-02-22 23:45:00 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#639
No description provided.