En Mon, 16 Jun 2008 06:29:09 -0300, Bruno Desthuilliers <[EMAIL PROTECTED]> 
escribió:

> Gabriel Genellina a écrit :
>
>> It appears that you want to catch all exceptions, just use Exception for 
>> that:
>> try:
>>    ...
>> except Exception:
>>    ...
>
> Hem... That's definitively *not* an a good advice here IMHO. A catch-all
> may be useful near a program's 'top-level' to handle any other unhandled
> exception in a more user-friendly way (ie : log the error, warns whoever
> is in charge, try to cleanly dispose of resources / data / whatever so
> we don't break anything, and display a nice and visible error message to
> the user), but anywhere else you really want to know *exactly* which
> exception(s) you're expecting to handle here and let the other propagate.

Yes, thanks for putting it perfectly clear - more clear than I could have 
written.

-- 
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to