🎨 Renamed ApiHelperException to SIMNetException due to project renaming

The project was originally initialized as 'ApiHelper', but has since been formally renamed to 'SIMNet'. This commit updates the base exception class name and the associated documentation comment to reflect this change, for consistency.
This commit is contained in:
洛水居室 2023-07-19 20:07:44 +08:00
parent abd73f4050
commit 07977a7738
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -1,11 +1,11 @@
from typing import Any, Optional, Dict, Union, Tuple, Type, NoReturn from typing import Any, Optional, Dict, Union, Tuple, Type, NoReturn
class ApiHelperException(Exception): class SIMNetException(Exception):
"""Base class for ApiHelper errors.""" """Base class for SIMNet errors."""
class NetworkError(ApiHelperException): class NetworkError(SIMNetException):
"""Base class for exceptions due to networking errors.""" """Base class for exceptions due to networking errors."""
@ -13,7 +13,7 @@ class TimedOut(NetworkError):
"""Raised when a request took too long to finish.""" """Raised when a request took too long to finish."""
class BadRequest(ApiHelperException): class BadRequest(SIMNetException):
"""Raised when an API request cannot be processed correctly. """Raised when an API request cannot be processed correctly.
Attributes: Attributes:
@ -180,7 +180,7 @@ class GeetestChallengeFailed(NeedChallenge):
message = "Geetest challenge failed." message = "Geetest challenge failed."
class NotSupported(ApiHelperException): class NotSupported(SIMNetException):
"""API not supported.""" """API not supported."""
def __init__(self, message: str = "API not supported."): def __init__(self, message: str = "API not supported."):