summaryrefslogtreecommitdiff
path: root/django/views/debug.py
diff options
context:
space:
mode:
authorGiebisch <rafael@giebisch-mail.de>2022-11-21 16:54:57 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-11-25 08:16:10 +0100
commit80c66e40f7beecbd5ee501f757a2e61236597349 (patch)
tree26d3bc257e6f379894a103406a7e80d9dd3f953d /django/views/debug.py
parent70c945d6b31b41b320e57088702077864428fdc0 (diff)
Fixed #33747 -- Added exception notes to the technical 500 debug page.
Diffstat (limited to 'django/views/debug.py')
-rw-r--r--django/views/debug.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/views/debug.py b/django/views/debug.py
index 30a1dbc6da..b93afa5737 100644
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -396,6 +396,8 @@ class ExceptionReporter:
c["exception_type"] = self.exc_type.__name__
if self.exc_value:
c["exception_value"] = str(self.exc_value)
+ if exc_notes := getattr(self.exc_value, "__notes__", None):
+ c["exception_notes"] = "\n" + "\n".join(exc_notes)
if frames:
c["lastframe"] = frames[-1]
return c