[IMP] on non-rpc debug, only break on non-HTTPException
Completes/improves fd6dde7ca
Because Werkzeug uses/provides flow-control exceptions via
HTTPException (which can be used as straight responses) they are used in
a few places of the web client, when triggering some redirections for
instance.
Breaking into the debugger for such mundane situations is surprising and
inconvenient for developers trying to debug actual issues in the system,
even though HTTPExceptions are by and large not error per-se, and
shouldn't warrant triggering post-mortem debugging.
So in the non-RPC dispatcher, don't post-mortem on HTTPException either.
This commit is contained in:
parent
0ec3c75c2d
commit
fca83b45f8
|
@ -270,7 +270,8 @@ class WebRequest(object):
|
|||
to abitrary responses. Anything returned (except None) will
|
||||
be used as response."""
|
||||
self._failed = exception # prevent tx commit
|
||||
if not isinstance(exception, NO_POSTMORTEM):
|
||||
if not isinstance(exception, NO_POSTMORTEM) \
|
||||
and not isinstance(exception, werkzeug.exceptions.HTTPException):
|
||||
openerp.tools.debugger.post_mortem(
|
||||
openerp.tools.config, sys.exc_info())
|
||||
raise
|
||||
|
|
Loading…
Reference in New Issue