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
|
|
|
|
2022-06-17 13:34:47 +03:00
|
|
|
"""Raised 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
|
|
|
|
2022-06-17 13:34:47 +03:00
|
|
|
"""Raised when a session cookie is empty which means incorrect credentials"""
|
2022-06-16 14:40:10 +03:00
|
|
|
|
|
|
|
class TokenError(AternosError):
|
|
|
|
|
2022-06-17 13:34:47 +03:00
|
|
|
"""Raised 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):
|
|
|
|
|
2022-06-17 13:34:47 +03:00
|
|
|
"""Raised when trying to start without confirming Mojang EULA"""
|
2022-06-16 14:40:10 +03:00
|
|
|
|
|
|
|
class ServerRunningError(ServerError):
|
|
|
|
|
2022-06-17 13:34:47 +03:00
|
|
|
"""Raised when trying to start already running server"""
|
2022-06-16 14:40:10 +03:00
|
|
|
|
|
|
|
class ServerSoftwareError(ServerError):
|
|
|
|
|
2022-06-17 13:34:47 +03:00
|
|
|
"""Raised when Aternos notifies about incorrect software version"""
|
2022-06-16 14:40:10 +03:00
|
|
|
|
|
|
|
class ServerStorageError(ServerError):
|
|
|
|
|
2022-06-17 13:34:47 +03:00
|
|
|
"""Raised when Aternos notifies about violation of storage limits (4 GB for now)"""
|
2021-10-15 14:12:45 +03:00
|
|
|
|
2022-03-18 17:38:36 +03:00
|
|
|
class FileError(AternosError):
|
2022-06-17 13:34:47 +03:00
|
|
|
|
|
|
|
"""Raised when trying to execute a disallowed by Aternos file operation"""
|