Source code for flexlock.exceptions

"""Custom exceptions for FlexLock."""


[docs] class FlexLockError(Exception): """Base exception for all FlexLock errors.""" pass
[docs] class FlexLockConfigError(FlexLockError): """Raised when there is an error in configuration.""" pass
[docs] class FlexLockExecutionError(FlexLockError): """Raised when there is an error during execution.""" pass
[docs] class FlexLockSnapshotError(FlexLockError): """Raised when there is an error creating or loading snapshots.""" pass
[docs] class FlexLockValidationError(FlexLockError): """Raised when validation of inputs fails.""" pass
[docs] class FlexLockCacheError(FlexLockError): """Raised when there is an error with smart run caching.""" pass
[docs] class FlexLockBackendError(FlexLockError): """Raised when there is an error with HPC backends (Slurm/PBS).""" pass
class UnresolvedInterpolationError(FlexLockConfigError): """Raised when a sub-node interpolation references a key that is not present in the sub-tree and cannot be resolved against the root config either.""" pass