Catch exceptions

Jonathan Gardner jgardner at jonathangardner.net
Mon Feb 27 19:49:42 EST 2006


(A) You'll have to be more specific about your problem if you want us
to help. Under which circumstances did it work or not? What exactly is
the problem?

(B) Where you put your error-handling is up to you. It depends on what
the function does and how it is to respond. Do you want the function to
throw an exception if the file is not found, or do you want it to do
something else? Think about the interface of the functions (which is
the sum of the parameters, response, possible exceptions, and expected
behavior) and it should be clear where to put the exception handling.




More information about the Python-list mailing list