try:
a = 1 / 0
except ZeroDivisionError, msg:
print "Message was", msg
This will print "Message was integer division or modulo". Everything
is fine.
But how could I do something like:
try:
a = 1 / 0
except exc, msg:
print "Exception was", exc, "and message", msg
I want to be able to assign exc to the raised exception.
Is there a way to do this ?
Sam