Mega Code Archive
Categories
/
Python Tutorial
/
Statement
Working with the Exception Information
import sys try : raise ValueError, "Got an error" except : if sys.exc_type == ValueError : print "Value Error" else : print "Something else"