From 342e7da2941ae5291f1a94b6ad66ce489f6985fe Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 13 Nov 2021 19:00:51 -0500 Subject: docs: document the exceptions ... and make some of them private. --- coverage/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coverage/parser.py') diff --git a/coverage/parser.py b/coverage/parser.py index d17d7c9b..665360fa 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -13,7 +13,7 @@ import tokenize from coverage import env from coverage.bytecode import code_objects from coverage.debug import short_stack -from coverage.exceptions import NoSource, NotPython, StopEverything +from coverage.exceptions import NoSource, NotPython, _StopEverything from coverage.misc import contract, join_regex, new_contract, nice_pair, one_of from coverage.phystokens import compile_unicode, generate_tokens, neuter_encoding_declaration @@ -356,7 +356,7 @@ class ByteParser: # attributes on code objects that we need to do the analysis. for attr in ['co_lnotab', 'co_firstlineno']: if not hasattr(self.code, attr): - raise StopEverything( # pragma: only jython + raise _StopEverything( # pragma: only jython "This implementation of Python doesn't support code analysis.\n" + "Run coverage.py under another Python for this command." ) -- cgit v1.2.1