printing error message from an Exception
mark jason
markjason72 at gmail.com
Fri Dec 10 04:12:51 EST 2010
On Dec 10, 11:55 am, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> # By the way, IOError is not the only exception you could see.
thanks for the help Steven. Is it OK to catch Exception instead of
IOError ?
In some operation which can cause many errors ,can I use the
following?
try:
do_something()
except Exception,e:
display_message(e.args)
handle_exception(e)
thanks,
mark
More information about the Python-list
mailing list