Message info
 
To: From:Django Subject:[Django] #18003: NEW POLICY: All naked excepts which raise an exception should include previous exception stack. Date:Thu, 29 Mar 2012 07:29:32 -0000
 

#18003: NEW POLICY: All naked excepts which raise an exception should include
previous exception stack.
-----------------------------------------------+--------------------
Reporter: Glenn Washburn <devlopment@> | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.4
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------------------+--------------------
I propose that there should be a strict policy for any new code being
committed and all old code as it is found to be offending that any where
there is a naked except, that is an except block that catches all
exceptions, and an exception is raised within this block, that the
previous exceptions exception call stack be preserved in the new raised
exception.

For example, in contrib/admin/views/main.py on line 319 there is a naked
except and the caught exception object is wrapped by another exception
class and then re-raised. This loses the call stack of the originating
exception, thus making it potentially very difficult to debug the original
exception.

This issue should fix the above and start a policy discussion.

--
Ticket URL: <https://code.djangoproject.com/ticket/18003>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.