summaryrefslogtreecommitdiff
path: root/pylint/exceptions.py
diff options
context:
space:
mode:
authorGlenn Matthews <glenn@e-dad.net>2016-07-18 09:38:41 -0400
committerGlenn Matthews <glenn@e-dad.net>2016-07-19 13:56:06 -0400
commit47577a4a396a148b92e656110c2bdb18632d44a9 (patch)
treec5deee016ad8ae5ce21d5c5b039fa505fd53433e /pylint/exceptions.py
parent211d81f84f6f9ad7325386145a546c09420d12aa (diff)
downloadpylint-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.py8
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"""