1
0
mirror of https://github.com/django/django.git synced 2025-03-05 15:02:31 +00:00

Added exception name in debug error message

This can help when some exception has no error message.
This commit is contained in:
Claude Paroz 2014-08-26 21:09:50 +02:00
parent ced3e303ca
commit cfee67ae10

View File

@ -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"))