Commit 84343a87 authored by Trevor Cappallo's avatar Trevor Cappallo
Browse files

add interpret failure detection and reporting

parent 23b58585
......@@ -14,6 +14,7 @@ import datetime
import StringIO
import inspect
import json
import traceback
import OperationalMail
......@@ -23,6 +24,13 @@ def __exit_handler(logger, notify):
for level in 'ERROR', 'CRITICAL':
if level not in notify:
notify[level] = []
try:
tb_lines = traceback.format_exception(sys.last_type, sys.last_value, sys.last_traceback)
logging.error("Interpreter failure detected! Traceback follows:\n%s\n", ''.join(tb_lines))
except AttributeError:
logging.debug("No interpreter errors.")
if logger.has_errors():
addresses = notify['ERROR']
if logger.has_critical():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment