Opened 14 years ago

Closed 14 years ago

#19827 closed Bug (fixed)

Exception reraise in defaulttags shoud keep stacktrace

Reported by: German M. Bravo Owned by: regebro
Component: Template system Version: 1.4
Severity: Normal Keywords: sprint2013
Cc: German M. Bravo Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description

I've stumbled upon a problem where a reraised exception doesn't keep the original stacktrace. I'm attaching a patch to fix this

Attachments (3)

#19827-stacktrace_on_reraise.diff​ (1.1 KB ) - added by German M. Bravo 14 years ago.
19827-stacktrace_on_reraise.diff​ (2.3 KB ) - added by regebro 14 years ago.
Patch using six.
19827-stacktrace_on_reraise.2.diff​ (2.3 KB ) - added by regebro 14 years ago.
Replacement based on feedback from claudep

Download all attachments as: .zip

Change History (13)

comment:1 by German M. Bravo, 14 years ago

Cc: German M. Bravo added

comment:2 by Aymeric Augustin, 14 years ago

Has patch: set
Needs tests: set
Patch needs improvement: set

The patch must use six.reraise for Python 3 compatibility.

See. ​https://docs.djangoproject.com/en/dev/topics/python3/#exceptions

by German M. Bravo, 14 years ago

comment:3 by Carl Meyer, 14 years ago

Component: Uncategorized → Template system
Triage Stage: Unreviewed → Accepted
Type: Uncategorized → Bug

comment:4 by regebro, 14 years ago

Owner: changed from nobody to regebro
Status: new → assigned
Last edited 14 years ago by regebro (previous) (diff)

comment:5 by regebro, 14 years ago

I've added a patch that uses six to solve this issue.

by regebro, 14 years ago

Patch using six.

comment:6 by regebro, 14 years ago

Needs tests: unset

Updated patch with a test.

comment:7 by regebro, 14 years ago

Easy pickings: set

comment:8 by Grzegorz Nosek, 14 years ago

Triage Stage: Accepted → Ready for checkin

by regebro, 14 years ago

Replacement based on feedback from claudep

comment:9 by Tomek Paczkowski, 14 years ago

Keywords: sprint2013 added

comment:10 by Claude Paroz <claude@…>, 14 years ago

Resolution: → fixed
Status: assigned → closed

In 687d2e967dbc7c2ba29a90c74becc539d3ac2b9d:

Fixed #19827 -- Kept stacktrace in defaulttags exception reraising

Thanks Kronuz for the report and the initial patch.

Note: See TracTickets for help on using tickets.
Back to Top