Source code for httk.workflow.errors

"""Exceptions raised by :mod:`httk.workflow`."""

__all__ = [
    "FormatError",
    "RunnerResolutionError",
    "TransactionError",
    "TransitionLostError",
    "UnsupportedExtensionError",
    "WorkflowError",
    "WorkspaceCorruptionError",
    "WorkspaceUnavailableError",
]


[docs] class WorkflowError(Exception): """Base class for workflow protocol failures."""
[docs] class FormatError(WorkflowError, ValueError): """A workspace, job, journal frame, outcome, or request is malformed."""
[docs] class WorkspaceUnavailableError(WorkflowError): """The workspace cannot currently provide a coherent protocol view."""
[docs] class WorkspaceCorruptionError(WorkflowError): """The authoritative filesystem state is internally inconsistent."""
[docs] class TransitionLostError(WorkflowError): """Another actor committed a transition from the expected marker."""
[docs] class UnsupportedExtensionError(WorkflowError): """A workspace requires an extension this implementation does not support."""
[docs] class TransactionError(WorkflowError): """A transactional-data manifest cannot be safely replayed."""
[docs] class RunnerResolutionError(WorkflowError): """A shared runner cannot be resolved, staged, or verified. The failure carries the exact protocol failure ``code`` the manager records, so an unresolvable runner (``runner_unavailable``) and a runner whose staged bytes disagree with the digest the job pinned (``runner_mismatch``) stay distinguishable to an operator. """ def __init__(self, code: str, message: str) -> None: super().__init__(message)
[docs] self.code = code