Answers for "python caught exception raised in another module"

1

only try python

try:
    a=2
except:
    pass
Posted by: Guest on October-22-2020
0

python defualt error handler

import sys
def my_except_hook(exctype, value, traceback):
    if exctype == KeyboardInterrupt:
        print "Handler code goes here"
    else:
        sys.__excepthook__(exctype, value, traceback)
sys.excepthook = my_except_hook
Posted by: Guest on August-27-2020

Code answers related to "python caught exception raised in another module"

Python Answers by Framework

Browse Popular Code Answers by Language