This repository has been archived on 2024-07-30. You can view files and clone it, but cannot push or open issues or pull requests.
python-aternos/python_aternos/aterrors.py

39 lines
987 B
Python
Raw Normal View History

2021-10-08 18:35:20 +03:00
class AternosError(Exception):
2022-06-16 14:40:10 +03:00
"""Common error class"""
2021-10-08 18:35:20 +03:00
2022-04-28 08:23:02 +03:00
class CloudflareError(AternosError):
2022-06-16 14:40:10 +03:00
"""Raises when the parser is unable to bypass Cloudflare protection"""
2022-04-28 08:23:02 +03:00
2022-03-18 17:38:36 +03:00
class CredentialsError(AternosError):
2022-06-16 14:40:10 +03:00
"""Raises when a session cookie is empty which means incorrect credentials"""
class TokenError(AternosError):
"""Raises when the parser is unable to extract Aternos ajax token"""
2021-10-08 18:35:20 +03:00
2022-03-18 17:38:36 +03:00
class ServerError(AternosError):
2022-06-16 14:40:10 +03:00
"""Common class for server errors"""
class ServerEulaError(ServerError):
"""Raises when trying to start without confirming Mojang EULA"""
class ServerRunningError(ServerError):
"""Raises when trying to start already running server"""
class ServerSoftwareError(ServerError):
"""Raises when Aternos notifies about incorrect software version"""
class ServerStorageError(ServerError):
"""Raises when Aternos notifies about violation of storage limits (4 GB for now)"""
2022-03-18 17:38:36 +03:00
class FileError(AternosError):
pass