From 5aec6fd0f440842cfa953b56f1b080f3ea9dcac1 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Mon, 3 Dec 2012 15:09:24 -1000 Subject: [PATCH] Report the name of the exception's class instead of converting the class to a string, resulting in shorter names. --- errorreporting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/errorreporting.py b/errorreporting.py index 11df928..a57f683 100644 --- a/errorreporting.py +++ b/errorreporting.py @@ -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))