diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-17 14:21:09 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-17 14:21:09 +0000 |
| commit | b5adaec4c23e3fa8ab52da1c10eb52f775d02209 (patch) | |
| tree | 6c7db0ba27240881970d9e9a75d57d5247c4018c /django/template/debug.py | |
| parent | 732074541a17cde1d6d634007949d8a8c83cdc1a (diff) | |
Fixed #5884 -- Added better display error handling for template variables.
Combined work from Karen Tracey and Thomas Güttler.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7260 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/template/debug.py')
| -rw-r--r-- | django/template/debug.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/debug.py b/django/template/debug.py index 008059c28f..c58c854858 100644 --- a/django/template/debug.py +++ b/django/template/debug.py @@ -75,7 +75,7 @@ class DebugNodeList(NodeList): raise except Exception, e: from sys import exc_info - wrapped = TemplateSyntaxError('Caught an exception while rendering: %s' % e) + wrapped = TemplateSyntaxError(u'Caught an exception while rendering: %s' % force_unicode(e, errors='replace')) wrapped.source = node.source wrapped.exc_info = exc_info() raise wrapped |
