diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-01-29 10:41:37 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-01-29 10:41:37 -0500 |
commit | cd83e41d7ee0eb2e48c8340539213f3bdee49239 (patch) | |
tree | bdc90b7e1e882f78b9266203d129c3ef60f5b708 /coverage/parser.py | |
parent | 99ba12c0121eaeedca3f42be52c87f23605c6771 (diff) | |
download | python-coveragepy-git-cd83e41d7ee0eb2e48c8340539213f3bdee49239.tar.gz |
How to flag uncaught exception branches
Diffstat (limited to 'coverage/parser.py')
-rw-r--r-- | coverage/parser.py | 5 |
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 |