30 lines
902 B
Python
30 lines
902 B
Python
|
|
"""
|
||
|
|
Custom exceptions for the exchanges module.
|
||
|
|
|
||
|
|
This module contains all custom exceptions used in the exchanges package
|
||
|
|
to provide more specific error handling and better error messages.
|
||
|
|
"""
|
||
|
|
|
||
|
|
class ExchangeError(Exception):
|
||
|
|
"""Base exception for all exchange-related errors."""
|
||
|
|
pass
|
||
|
|
|
||
|
|
class ExchangeNotSupportedError(ExchangeError):
|
||
|
|
"""Raised when an exchange is not supported or not found in registry."""
|
||
|
|
pass
|
||
|
|
|
||
|
|
class InvalidConfigurationError(ExchangeError):
|
||
|
|
"""Raised when exchange configuration is invalid."""
|
||
|
|
pass
|
||
|
|
|
||
|
|
class CollectorCreationError(ExchangeError):
|
||
|
|
"""Raised when there's an error creating a collector instance."""
|
||
|
|
pass
|
||
|
|
|
||
|
|
class ExchangeConnectionError(ExchangeError):
|
||
|
|
"""Raised when there's an error connecting to an exchange."""
|
||
|
|
pass
|
||
|
|
|
||
|
|
class ValidationError(ExchangeError):
|
||
|
|
"""Raised when validation fails for exchange parameters."""
|
||
|
|
pass
|