# SPDX-License-Identifier: PROPRIETARY
# SPDX-FileCopyrightText: Copyright The Geneva Authors

"""Public Geneva exception types."""


class FatalWorkerError(RuntimeError):
    """Base exception for fatal worker termination during UDF execution."""


class FatalWorkerOOMError(FatalWorkerError):
    """Fatal worker termination caused by OOM."""


class FatalWorkerCrashError(FatalWorkerError):
    """Fatal worker termination caused by worker crash or segfault."""


class FatalWorkerTransientError(FatalWorkerError):
    """Fatal worker termination likely caused by transient infrastructure loss."""


class FatalWorkerExitError(FatalWorkerError):
    """Fatal worker termination with unknown or generic worker-exit cause."""


__all__ = [
    "FatalWorkerCrashError",
    "FatalWorkerError",
    "FatalWorkerExitError",
    "FatalWorkerOOMError",
    "FatalWorkerTransientError",
]
