Merge branch 'pr/839'

This commit is contained in:
Armin Ronacher 2014-05-07 21:53:59 +02:00
commit 5693b9d730
3 changed files with 49 additions and 3 deletions

View file

@ -1441,8 +1441,6 @@ class Flask(_PackageBoundObject):
# wants the traceback preserved in handle_http_exception. Of course
# we cannot prevent users from trashing it themselves in a custom
# trap_http_exception method so that's their fault then.
if isinstance(e, HTTPException) and not self.trap_http_exception(e):
return self.handle_http_exception(e)
blueprint_handlers = ()
handlers = self.error_handler_spec.get(request.blueprint)
@ -1453,6 +1451,9 @@ class Flask(_PackageBoundObject):
if isinstance(e, typecheck):
return handler(e)
if isinstance(e, HTTPException) and not self.trap_http_exception(e):
return self.handle_http_exception(e)
reraise(exc_type, exc_value, tb)
def handle_exception(self, e):