Browse Source

Added exception name in debug error message

This can help when some exception has no error message.
Claude Paroz 10 years ago
parent
commit
cfee67ae10
1 changed files with 1 additions and 1 deletions
  1. 1 1
      django/template/defaultfilters.py

+ 1 - 1
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"))