Get an exception's argument : Exception Info « Exception « Python






Get an exception's argument

Get an exception's argument


# 
try:
    num = float(raw_input("\nEnter a number: "))
except(ValueError), e:
    print "That was not a number!  Or as Python would say:\n", e

           
       








Related examples in the same category

1.Output exception arguments, string representation of exception,and the tracebackOutput exception arguments, string representation of exception,and the traceback
2.Print out exception infoPrint out exception info