50 lines
1.3 KiB
Python
50 lines
1.3 KiB
Python
"""Public exception types for dpg-map."""
|
|
|
|
|
|
class DpgMapError(Exception):
|
|
"""Base exception for all public dpg-map errors."""
|
|
|
|
|
|
class DpgMapNotImplementedError(DpgMapError, NotImplementedError):
|
|
"""Raised by public APIs that are intentionally stubbed during the rebuild."""
|
|
|
|
|
|
class ProviderError(DpgMapError):
|
|
"""Base exception for tile provider errors."""
|
|
|
|
|
|
class ProviderExistsError(ProviderError):
|
|
"""Raised when registering a provider name that already exists."""
|
|
|
|
|
|
class ProviderNotFoundError(ProviderError):
|
|
"""Raised when a requested tile provider is not registered."""
|
|
|
|
|
|
class InvalidProviderError(ProviderError, ValueError):
|
|
"""Raised when a tile provider definition is invalid."""
|
|
|
|
|
|
class ProjectionError(DpgMapError, ValueError):
|
|
"""Raised when geographic projection input is invalid."""
|
|
|
|
|
|
class MapNotFoundError(DpgMapError, KeyError):
|
|
"""Raised when a requested map tag is not registered."""
|
|
|
|
|
|
class OverlayNotFoundError(DpgMapError, KeyError):
|
|
"""Raised when a requested overlay tag is not registered."""
|
|
|
|
|
|
class CoordinateError(DpgMapError, ValueError):
|
|
"""Raised when geographic coordinate input is invalid."""
|
|
|
|
|
|
class ThreadingError(DpgMapError):
|
|
"""Raised when an operation violates dpg-map threading rules."""
|
|
|
|
|
|
class CacheError(DpgMapError):
|
|
"""Raised when cache metadata or paths cannot be handled."""
|