traceback object can print out information about the exception : Try : Statement PYTHON TUTORIALS


PYTHON TUTORIALS » Statement » Try »

 

traceback object can print out information about the exception


import sys
import traceback

def excFunc() :
    raise ValueError
    
try:
    excFunc()
except:
    print "Got an exception"
    print traceback.print_stack(sys.exc_info()[2])



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Statement
» Try