2016-07-18 13:38:41 +00:00
|
|
|
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
2021-07-01 10:47:58 +00:00
|
|
|
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
|
2022-03-01 15:04:49 +00:00
|
|
|
# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
|
2016-07-18 13:38:41 +00:00
|
|
|
|
|
|
|
"""Exception classes raised by various operations within pylint."""
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidMessageError(Exception):
|
2022-02-10 18:30:15 +00:00
|
|
|
"""Raised when a message creation, registration or addition is rejected."""
|
2016-07-18 19:56:04 +00:00
|
|
|
|
2018-09-16 15:33:50 +00:00
|
|
|
|
2016-07-18 20:02:48 +00:00
|
|
|
class UnknownMessageError(Exception):
|
2022-02-10 18:30:15 +00:00
|
|
|
"""Raised when an unregistered message id is encountered."""
|
2016-07-18 19:56:04 +00:00
|
|
|
|
2018-09-16 15:33:50 +00:00
|
|
|
|
2016-07-18 20:02:48 +00:00
|
|
|
class EmptyReportError(Exception):
|
2022-02-10 18:30:15 +00:00
|
|
|
"""Raised when a report is empty and so should not be displayed."""
|
2017-04-28 17:33:34 +00:00
|
|
|
|
2018-09-16 15:33:50 +00:00
|
|
|
|
2017-04-28 17:33:34 +00:00
|
|
|
class InvalidReporterError(Exception):
|
2022-02-10 18:30:15 +00:00
|
|
|
"""Raised when selected reporter is invalid (e.g. not found)."""
|
2019-03-02 13:28:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
class InvalidArgsError(ValueError):
|
2022-02-10 18:30:15 +00:00
|
|
|
"""Raised when passed arguments are invalid, e.g., have the wrong length."""
|
2021-08-05 04:59:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
class NoLineSuppliedError(Exception):
|
2022-02-10 18:30:15 +00:00
|
|
|
"""Raised when trying to disable a message on a next line without supplying a line number."""
|