diff options
author | Glenn Matthews <glenn@e-dad.net> | 2016-07-18 09:38:41 -0400 |
---|---|---|
committer | Glenn Matthews <glenn@e-dad.net> | 2016-07-19 13:56:06 -0400 |
commit | 47577a4a396a148b92e656110c2bdb18632d44a9 (patch) | |
tree | c5deee016ad8ae5ce21d5c5b039fa505fd53433e /pylint/exceptions.py | |
parent | 211d81f84f6f9ad7325386145a546c09420d12aa (diff) | |
download | pylint-git-47577a4a396a148b92e656110c2bdb18632d44a9.tar.gz |
Better input validation in register_messages to avoid overwrites.
Add InvalidMessageError and use it instead of asserts in pylint.utils.
Diffstat (limited to 'pylint/exceptions.py')
-rw-r--r-- | pylint/exceptions.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pylint/exceptions.py b/pylint/exceptions.py new file mode 100644 index 000000000..20c569be6 --- /dev/null +++ b/pylint/exceptions.py @@ -0,0 +1,8 @@ +# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html +# For details: https://github.com/PyCQA/pylint/blob/master/COPYING + +"""Exception classes raised by various operations within pylint.""" + + +class InvalidMessageError(Exception): + """raised when a message creation, registration or addition is rejected""" |