#8464: Django should allow exceptions to bubble up from urlconf imports
-------------------------------------------------------------+--------------
Reporter: [EMAIL PROTECTED] | Owner:
nobody
Status: new | Milestone:
Component: Core framework | Version:
1.0-alpha-2
Keywords: ImproperlyConfigured urconf exception traceback | Stage:
Unreviewed
Has_patch: 0 |
-------------------------------------------------------------+--------------
Exceptions are very hard to debug when they occur during a urlconf import.
In django.core.urlresolvers._get_urlconf_module(), it wraps the
__import__ line in a try/except, and throws a new ImproperlyConfigured
exception if any type of Exception is encountered. This means the only
information available to the developer through the django debug page is
the error message of the original exception, and not the traceback
information (which is equally as important as the message itself, imho).
That is, the original traceback information is lost because django throws
a new exception.
Because there is potentially a lot of code that gets executed during an
import, I believe _get_urlconf_module() should allow the exception to
bubble up. This will make urlconf import issues much easier to debug. I
don't see much advantage gained from the way it does it now.
--
Ticket URL: <http://code.djangoproject.com/ticket/8464>
Django Code <http://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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---