diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-13 19:23:24 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-14 08:12:49 -0500 |
commit | b82e9fd8766a77c2a275bde7b574f3e8cb529f8f (patch) | |
tree | f310ea38a19f2b4e8c93ee3e3a5b8a99aa43351a /coverage/files.py | |
parent | 342e7da2941ae5291f1a94b6ad66ce489f6985fe (diff) | |
download | python-coveragepy-git-nedbat/exceptions.tar.gz |
refactor: specialize exceptionsnedbat/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/files.py')
-rw-r--r-- | coverage/files.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coverage/files.py b/coverage/files.py index a721e533..afb0dbf5 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -13,7 +13,7 @@ import re import sys from coverage import env -from coverage.exceptions import CoverageException +from coverage.exceptions import ConfigError from coverage.misc import contract, human_sorted, isolate_module, join_regex @@ -356,7 +356,7 @@ class PathAliases: # The pattern can't end with a wildcard component. if pattern.endswith("*"): - raise CoverageException("Pattern must not end with wildcards.") + raise ConfigError("Pattern must not end with wildcards.") # The pattern is meant to match a filepath. Let's make it absolute # unless it already is, or is meant to match any prefix. |