#6379 closed Bug (needsinfo)
Don't hide errors when resolving URL views
Reported by: | 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 |
Description ¶
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)
by , 17 years ago
Attachment: | no_exception_hiding.diff added |
---|
comment:1 by , 17 years ago
Has patch: | set |
---|
comment:2 by , 17 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:3 by , 17 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Ready for checkin → Accepted |
comment:4 by , 17 years ago
Can you tell what cases are still going to slip through?
And is there a way you can distinguish different ImportErrors without looking at the exception string? Perhaps that is what you meant by "real solution".
comment:5 by , 16 years ago
Cc: | added |
---|
comment:7 by , 16 years ago
Component: | Uncategorized → Core framework |
---|
comment:8 by , 14 years ago
Resolution: | → duplicate |
---|---|
Severity: | → Normal |
Status: | new → closed |
Type: | → Uncategorized |
I think this is essentially the same thing as #5904.
comment:9 by , 14 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
This is not a duplicate of itself, is it?
comment:10 by , 14 years ago
Type: | Uncategorized → Bug |
---|
comment:11 by , 13 years ago
Easy pickings: | unset |
---|---|
UI/UX: | unset |
The resolver code has evolved a lot during time, and seems now more selective about what is swallowed as a ViewDoesNotExist exception. Do you still think it's an issue? If yes, some more actual example would be welcome.
comment:12 by , 12 years ago
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).