API Reference
Epochly API Reference: Exceptions
Epochly exception classes, error codes, and handling patterns for robust error recovery.
Exception classes raised by Epochly.
EpochlyError
Base exception class for all Epochly errors.
from epochly import EpochlyErrortry:epochly.configure(invalid_param=True)except EpochlyError as e:print(f"Epochly error: {e}")
EpochlyConfigError
Raised for configuration errors.
from epochly import EpochlyConfigErrortry:epochly.configure(enhancement_level=99) # Invalid levelexcept EpochlyConfigError as e:print(f"Configuration error: {e}")
EpochlyCompatibilityError
Raised when optimization is not compatible with the environment.
from epochly import EpochlyCompatibilityErrortry:epochly.set_level(4) # GPU not availableexcept EpochlyCompatibilityError as e:print(f"Compatibility error: {e}")
Catching License Errors
Use the base EpochlyError to catch license-related errors.
from epochly import EpochlyErrortry:epochly.configure(enhancement_level=4) # Requires Pro licenseexcept EpochlyError as e:print(f"License error: {e}")
EpochlyInitializationError
Raised when Epochly fails to initialize a component.
from epochly import EpochlyInitializationErrortry:result = optimized_function(bad_data)except EpochlyInitializationError as e:print(f"Initialization error: {e}")
Exception Hierarchy
EpochlyError├── EpochlyConfigError├── EpochlyCompatibilityError└── EpochlyInitializationError