Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clearer explanation when exception has no message

"No exception supplied" is misleading; actually there is an exception,
but there's no message string.
  • Loading branch information...
commit 172b50b72224dea985cd665accab2ff3110f6674 1 parent 73c26f0
@intgr intgr authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 django/views/debug.py
  2. +1 −1  tests/view_tests/tests/test_debug.py
View
4 django/views/debug.py
@@ -584,7 +584,7 @@ def default_urlconf(request):
<body>
<div id="summary">
<h1>{% if exception_type %}{{ exception_type }}{% else %}Report{% endif %}{% if request %} at {{ request.path_info|escape }}{% endif %}</h1>
- <pre class="exception_value">{% if exception_value %}{{ exception_value|force_escape }}{% else %}No exception supplied{% endif %}</pre>
+ <pre class="exception_value">{% if exception_value %}{{ exception_value|force_escape }}{% else %}No exception message supplied{% endif %}</pre>
<table class="meta">
{% if request %}
<tr>
@@ -927,7 +927,7 @@ def default_urlconf(request):
"""
TECHNICAL_500_TEXT_TEMPLATE = """{% load firstof from future %}{% firstof exception_type 'Report' %}{% if request %} at {{ request.path_info }}{% endif %}
-{% firstof exception_value 'No exception supplied' %}
+{% firstof exception_value 'No exception message supplied' %}
{% if request %}
Request Method: {{ request.META.REQUEST_METHOD }}
Request URL: {{ request.build_absolute_uri }}{% endif %}
View
2  tests/view_tests/tests/test_debug.py
@@ -128,7 +128,7 @@ def test_no_exception(self):
reporter = ExceptionReporter(request, None, None, None)
html = reporter.get_traceback_html()
self.assertIn('<h1>Report at /test_view/</h1>', html)
- self.assertIn('<pre class="exception_value">No exception supplied</pre>', html)
+ self.assertIn('<pre class="exception_value">No exception message supplied</pre>', html)
self.assertIn('<th>Request Method:</th>', html)
self.assertIn('<th>Request URL:</th>', html)
self.assertNotIn('<th>Exception Type:</th>', html)
Please sign in to comment.
Something went wrong with that request. Please try again.