You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
632 B

"""RCON exceptions."""
__all__ = ['ConfigReadError', 'RequestIdMismatch', 'WrongPassword']
class ConfigReadError(Exception):
"""Indicates an error while reading the configuration."""
def __init__(self, exit_code: int):
super().__init__()
self.exit_code = exit_code
class RequestIdMismatch(Exception):
"""Indicates a mismatch in request IDs."""
def __init__(self, sent: int, received: int):
"""Sets the sent and received IDs."""
super().__init__()
self.sent = sent
self.received = received
class WrongPassword(Exception):
"""Indicates a wrong password."""