Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #defualt #error #handler
ADD COMMENT
Topic
Name
6+6 =