import sys, tracebackMyError = 'hello'def oops(): raise MyError, 'world'def safe(entry, *args): try: apply(entry, args) # catch everything else except: traceback.print_exc() print 'Got', sys.exc_type, sys.exc_valueif __name__ == '__main__': safe(oops)
Name (required)
email (will not be published) (required)
Website