Dealing with exceptions
jeanpierreda at gmail.com
Sat Mar 2 20:27:37 CET 2013
On Sat, Mar 2, 2013 at 1:21 PM, Chris Angelico <rosuav at gmail.com> wrote:
>> now, I need to figure out just what exceptions to handle.
> Here's a bit of a left-field thought: Maybe none of them.
> What are you actually doing when you get an exception? Can you
> plausibly recover? If not - that is, if you're going to abort the
> whole operation anyway - then save yourself the trouble of writing the
> try/catch, and just let the exception propagate up (to the console, if
> nowhere else).
He can't know if he should handle the errors if he doesn't know what
those errors are. Thus the question.
More information about the Python-list