Opened 8 years ago
Last modified 7 years ago
#12385 closed defect
Trap NotImplementedError — at Initial Version
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.11 |
Component: | general | Version: | |
Severity: | normal | Keywords: | exception |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Raising a NotImplementedError
exception results in the following page:
Note that this standard error screen suggests that the user might create a ticket. If the developer is explicitly raising a NotImpementedError
, we probably don't want users reporting these issues (#11611). Ideally the NotImplementedError
would have an explanation, perhaps even a link to the ticket in which the feature/method will be implemented. That may be applicable to the scenario that led to the screen capture.
Traceback (most recent call last): File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/web/main.py", line 554, in _dispatch_request dispatcher.dispatch(req) File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/web/main.py", line 247, in dispatch resp = chosen_handler.process_request(req) File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/versioncontrol/web_ui/log.py", line 271, in process_request for cpath, kind, chg, bpath, brev in changeset.get_changes(): File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/versioncontrol/api.py", line 1244, in get_changes raise NotImplementedError NotImplementedError:
We could add a TracNotImplementedError
:
class TracNotImplementedError(TracError, NotImplementedError)
Or we could trap NotImplementedError
where TracError
is trapped.