Source code for flowrra.exceptions

"""Custom exceptions for flowrra."""

[docs] class FlowrraError(Exception): pass
[docs] class TaskNotFoundError(FlowrraError): """Raised when a task is not found in the registry."""
[docs] def __init__(self, task_name: str): self.task_name = task_name super().__init__(f"Task '{task_name}' not registered")
[docs] class TaskTimeoutError(FlowrraError): """Raised when waiting for a task result times out."""
[docs] def __init__(self, task_id: int, timeout: float): self.task_id = task_id self.timeout = timeout super().__init__(f"Task '{task_id}' did not complete within {timeout}s")
[docs] class ExecutorNotRunningError(FlowrraError): """Raised when submitting to a stopped executor."""
[docs] def __init__(self): super().__init__("Executor is not running. Call start() first.")
[docs] class BackendError(FlowrraError): """Raised when a backend operation fails.""" pass