Merge lp:~benji/launchpad/bug-697735-2 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Graham Binns | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 13264 | ||||
Proposed branch: | lp:~benji/launchpad/bug-697735-2 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
381 lines (+167/-15) 5 files modified
lib/canonical/launchpad/webapp/errorlog.py (+14/-2) lib/canonical/launchpad/webapp/interfaces.py (+22/-10) lib/canonical/launchpad/webapp/menu.py (+4/-1) lib/canonical/launchpad/webapp/tests/test_errorlog.py (+92/-2) lib/lp_sitecustomize.py (+35/-0) |
||||
To merge this branch: | bzr merge lp:~benji/launchpad/bug-697735-2 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+64563@code.launchpad.net |
Commit message
[r=gmb][bug=697735] don't do OOPS reports for URL parameter type conversion errors
Description of the change
Bug 697735 is about OOPS reports that are generated when
zope.publisher.
?foo:int=7) and the conversion raises an exception. Generating an error
is fine, but we don't want OOPS reports logged when they occur.
This branch adds a marker interface that can be applied to an exception
that signals the OOPS reporting mechanism that no report should be
logged. Originally I added an underscore-prefixed attribute to
exceptions that shouldn't be recorded, but Gary suggested the
improvement of using a marker interface.
The several tests were added to
lib/canonical/
behavior.
A fair bit of mostly whitespace lint was fixed in
./lib/canonical
The only suboptimal part of this branch is the need to monkey patch
zope.publisher.
wrap the conversion functions with a try/except to mark ValueErrors as
non-oops-report-worthy. Gary and I discussed this aspect of the branch
and felt like it was a reasonable compromise.
Thanks for the lint cleanup along with everything else. r=me.