Don't hide errors when resolving URL views
Reported by: |
Bastian Kleineidam <calvin@…> |
Owned by: |
nobody |
Component:
|
Core (Other)
|
Version:
|
dev
|
Severity:
|
Normal
|
Keywords:
|
|
Cc:
|
hv@…
|
Triage Stage:
|
Accepted
|
Has patch:
|
yes
|
Needs documentation:
|
no
|
Needs tests:
|
no
|
Patch needs improvement:
|
yes
|
Easy pickings:
|
no
|
UI/UX:
|
no
|
The URL resolver catches _all_ attribute and import errors. This has the affect of hiding unrelated import errors in other parts of the (view) code which made it very hard for me to track them down.
This patch only catches the "missing view function" attribute error, and "unable to import view function" import error. All other errors are reraised.
Change History
(13)
Triage Stage: |
Unreviewed → Ready for checkin
|
Patch needs improvement: |
set
|
Triage Stage: |
Ready for checkin → Accepted
|
Component: |
Uncategorized → Core framework
|
Resolution: |
→ duplicate
|
Severity: |
→ Normal
|
Status: |
new → closed
|
Type: |
→ Uncategorized
|
Resolution: |
duplicate
|
Status: |
closed → reopened
|
Type: |
Uncategorized → Bug
|
Easy pickings: |
unset
|
UI/UX: |
unset
|
Resolution: |
→ needsinfo
|
Status: |
reopened → closed
|
This is only half a solution (a lot of cases are still going to slip through) and trying to poke around in the exception string is a bit fragile. I'd rather that we tried to report a better traceback for the problem to guide the user to the correct location.
Leaving open for now, since it captures the problem, but I'd personally prefer to see an alternate solution for this one (it's a real problem; that's a given. Let's come up with a real solution).