Documentation

Exceptions Reference

Exception classes raised by Epochly.


EpochlyError

Base exception class for all Epochly errors.

from epochly import EpochlyError
try:
epochly.configure(invalid_param=True)
except EpochlyError as e:
print(f"Epochly error: {e}")

EpochlyConfigError

Raised for configuration errors.

from epochly import EpochlyConfigError
try:
epochly.configure(level=99) # Invalid level
except EpochlyConfigError as e:
print(f"Configuration error: {e}")

EpochlyCompatibilityError

Raised when optimization is not compatible with the environment.

from epochly import EpochlyCompatibilityError
try:
epochly.set_level(4) # GPU not available
except EpochlyCompatibilityError as e:
print(f"Compatibility error: {e}")

EpochlyLicenseError

Raised for license-related errors.

from epochly import EpochlyLicenseError
try:
epochly.configure(level=4) # Requires Pro license
except EpochlyLicenseError as e:
print(f"License error: {e}")

EpochlyRuntimeError

Raised for runtime errors during optimization.

from epochly import EpochlyRuntimeError
try:
result = optimized_function(bad_data)
except EpochlyRuntimeError as e:
print(f"Runtime error: {e}")

Exception Hierarchy

EpochlyError
├── EpochlyConfigError
├── EpochlyCompatibilityError
├── EpochlyLicenseError
└── EpochlyRuntimeError