diff options
| author | farhan <farhanalirazaazeemi@gmail.com> | 2025-03-21 20:06:12 +0500 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-04-17 08:56:53 +0200 |
| commit | 4a293eff6fb10a04de7c65ed705ca3c6a362a587 (patch) | |
| tree | 88a45a60491e846ca3983e2e1c8ba7b9cc3efe91 /django/views | |
| parent | 098c8bc99c84e6b09ee0066ed85b216ec63a046a (diff) | |
Fixed #28050 -- Added template name to TemplateSyntaxError.
Diffstat (limited to 'django/views')
| -rw-r--r-- | django/views/debug.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/views/debug.py b/django/views/debug.py index 425ad296b2..948cdcbf2f 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -414,7 +414,9 @@ class ExceptionReporter: if self.exc_type: c["exception_type"] = self.exc_type.__name__ if self.exc_value: - c["exception_value"] = str(self.exc_value) + c["exception_value"] = getattr( + self.exc_value, "raw_error_message", self.exc_value + ) if exc_notes := getattr(self.exc_value, "__notes__", None): c["exception_notes"] = "\n" + "\n".join(exc_notes) if frames: |
