You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I generally base exceptions on StandardError because it's usually bad policy to catch Exception because it's too broad. PyCharm complains about it so I know it's not just my own issue.
Would it harm downstream exc handlers to base off of StandardError or something even lower in the exc mro?
Any handlers which are already catching Exception won't be affected. StopIteration and Warming excs don't seem to be necessary for the ShotgunError exc hier.
The text was updated successfully, but these errors were encountered:
We totally agree!! We are trying to be good python citizens and have been trying to begin moving away from these broad catch-all traps in favour of more specific ones (RuntimeError, StandardError). We are trying to improve the code as we go and as we create new code. New code is linted by hound to make sure these things are caught as part of the CR process. Right now, it's an incremental process.
Is there any particular case you are worried about or a bug that you have seen or is this more of a general concern?
I generally base exceptions on StandardError because it's usually bad policy to catch Exception because it's too broad. PyCharm complains about it so I know it's not just my own issue.
Would it harm downstream exc handlers to base off of StandardError or something even lower in the exc mro?
Any handlers which are already catching Exception won't be affected. StopIteration and Warming excs don't seem to be necessary for the ShotgunError exc hier.
The text was updated successfully, but these errors were encountered: