From cfee67ae100343f9e20f412a0b2c56e001d84eca Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Tue, 26 Aug 2014 21:09:50 +0200 Subject: [PATCH] Added exception name in debug error message This can help when some exception has no error message. --- django/template/defaultfilters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py index 713bf1c02d..3e35e67bd0 100644 --- a/django/template/defaultfilters.py +++ b/django/template/defaultfilters.py @@ -969,4 +969,4 @@ def pprint(value): try: return pformat(value) except Exception as e: - return "Error in formatting: %s" % force_text(e, errors="replace") + return "Error in formatting: %s: %s" % (e.__class__.__name__, force_text(e, errors="replace"))