Exception handling....dumb question?

kbperry keith.b.perry at gmail.com
Fri Mar 31 18:51:33 EST 2006


In Python,
When using the default except (like following)

try:
    some code that might blow up

except:
    print "some error message"


Is there a way to show what error it is throwing?

Like in Java, you can do
catch (Exception e){
    System.out.println(e);
}

Or something like that.

Is there an equivalent way to do this in Python?




More information about the Python-list mailing list