summaryrefslogtreecommitdiff
path: root/coverage/parser.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-01-29 10:41:37 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-01-29 10:41:37 -0500
commitcd83e41d7ee0eb2e48c8340539213f3bdee49239 (patch)
treebdc90b7e1e882f78b9266203d129c3ef60f5b708 /coverage/parser.py
parent99ba12c0121eaeedca3f42be52c87f23605c6771 (diff)
downloadpython-coveragepy-git-cd83e41d7ee0eb2e48c8340539213f3bdee49239.tar.gz
How to flag uncaught exception branches
Diffstat (limited to 'coverage/parser.py')
-rw-r--r--coverage/parser.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/coverage/parser.py b/coverage/parser.py
index 1a2ff5f8..27c17438 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -668,6 +668,11 @@ class AstArcAnalyzer(object):
self.process_raise_exits(exits)
if try_block.return_from:
self.process_return_exits(exits)
+ else:
+ # No final body: if there is an `except` handler without a
+ # catch-all, then exceptions can raise from there.
+ if last_handler_start is not None:
+ self.process_raise_exits([last_handler_start])
return exits