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 | 87453c9c87650976092f3172c370b5aba589159c (patch) | |
tree | d293a7a1f674fbf94a4450abe7c054f3169dfa07 /coverage/parser.py | |
parent | 09184a99a25fa8fa267a2ac1320abb71fcad5079 (diff) | |
download | python-coveragepy-87453c9c87650976092f3172c370b5aba589159c.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 1a2ff5f..27c1743 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 |