Mega Code Archive
Categories
/
Python Tutorial
/
Statement
String-Based Exceptions
myexc = "My exception string" try: raise myexc except myexc: print 'caught'