def the_exception_hook(exctype, value, traceback):
'''Finds the error occurs when Osdag crashes
Args:
exctype: type of error
value: information of the error
traceback: trace the object
Returns:
system exit(1)
'''
# Print the error and traceback
print "Error occurred: ", (exctype, value, traceback)
# Call the normal Exception hook after
sys.__excepthook__(exctype, value, traceback)
sys.exit(1)
# Set the exception hook to our wrapping function
评论列表
文章目录