Report the name of the exception's class instead of converting the class to a string, resulting in shorter names.

This commit is contained in:
David Vierra 2012-12-03 15:09:24 -10:00
parent 8f7be2743b
commit 5aec6fd0f4

View File

@ -126,9 +126,9 @@ def json_crash_report():
exception = report['exception'] = {}
exception['backtrace'] = get_backtrace()
exception['exception_class'] = str(exc_class)
exception['exception_class'] = exc_class.__name__
if isinstance(exc_class, UnicodeError):
exception['message'] = str(exc_class)
exception['message'] = exc_class.__name__
else:
try:
exception['message'] = sanitize(str(exc_value))