exceptions.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright (c) 2016-2018, 2020 Claudiu Popa <pcmanticore@gmail.com>
  2. # Copyright (c) 2016 Glenn Matthews <glenn@e-dad.net>
  3. # Copyright (c) 2017 Łukasz Rogalski <rogalski.91@gmail.com>
  4. # Copyright (c) 2018 Ville Skyttä <ville.skytta@iki.fi>
  5. # Copyright (c) 2019 Thomas Hisch <t.hisch@gmail.com>
  6. # Copyright (c) 2020 hippo91 <guillaume.peillex@gmail.com>
  7. # Copyright (c) 2020 Anthony Sottile <asottile@umich.edu>
  8. # Copyright (c) 2021 Ashley Whetter <ashley@awhetter.co.uk>
  9. # Copyright (c) 2021 Pierre Sassoulas <pierre.sassoulas@gmail.com>
  10. # Copyright (c) 2021 Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
  11. # Copyright (c) 2021 Marc Mueller <30130371+cdce8p@users.noreply.github.com>
  12. # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  13. # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
  14. """Exception classes raised by various operations within pylint."""
  15. class InvalidMessageError(Exception):
  16. """raised when a message creation, registration or addition is rejected"""
  17. class UnknownMessageError(Exception):
  18. """raised when an unregistered message id is encountered"""
  19. class EmptyReportError(Exception):
  20. """raised when a report is empty and so should not be displayed"""
  21. class InvalidReporterError(Exception):
  22. """raised when selected reporter is invalid (e.g. not found)"""
  23. class InvalidArgsError(ValueError):
  24. """raised when passed arguments are invalid, e.g., have the wrong length"""
  25. class NoLineSuppliedError(Exception):
  26. """raised when trying to disable a message on a next line without supplying a line number"""