summaryrefslogtreecommitdiff
path: root/coverage/plugin_support.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-11-13 19:23:24 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-11-14 11:41:23 -0500
commit1c29ef3e4b871508bb2defd6b47b9a745547b626 (patch)
tree931fd2d7175321fd1549fd32e378cddcc99d2537 /coverage/plugin_support.py
parent342e7da2941ae5291f1a94b6ad66ce489f6985fe (diff)
downloadpython-coveragepy-git-1c29ef3e4b871508bb2defd6b47b9a745547b626.tar.gz
refactor: specialize exceptions
CoverageException is fine as a base class, but not good to use for raising (and catching sometimes). Introduce specialized exceptions that allow third-party tools to integrate better.
Diffstat (limited to 'coverage/plugin_support.py')
-rw-r--r--coverage/plugin_support.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/coverage/plugin_support.py b/coverage/plugin_support.py
index dfe5a4ec..0b892391 100644
--- a/coverage/plugin_support.py
+++ b/coverage/plugin_support.py
@@ -7,7 +7,7 @@ import os
import os.path
import sys
-from coverage.exceptions import CoverageException
+from coverage.exceptions import PluginError
from coverage.misc import isolate_module
from coverage.plugin import CoveragePlugin, FileTracer, FileReporter
@@ -44,7 +44,7 @@ class Plugins:
coverage_init = getattr(mod, "coverage_init", None)
if not coverage_init:
- raise CoverageException(
+ raise PluginError(
f"Plugin module {module!r} didn't define a coverage_init function"
)