gfwapiclient.exceptions.base
¶
Global Fishing Watch (GFW) API Python Client - Base Exceptions.
Module Contents¶
Data¶
API¶
- gfwapiclient.exceptions.base.__all__ = ['GFWAPIClientError']¶
- exception gfwapiclient.exceptions.base.GFWAPIClientError(message: Optional[str] = None)¶
Bases:
Exception
Base exception for errors related to the GFW API client.
This exception serves as the parent class for all errors raised by the gfwapiclient package, making it useful for broad exception handling.
- Attributes:
- message (str):
The error message.
- Example:
```python from gfwapiclient.exceptions import GFWAPIClientError
- try:
raise GFWAPIClientError(“An unexpected error occurred.”)
- except GFWAPIClientError as exc:
print(f”GFW Exception: {exc}”)
Initialization
Initialize a new GFWAPIClientError exception.
- Args:
- message (Optional[str], default=None):
Error message describing the exception.