# Generated by sila2.code_generator; sila2.__version__: 0.12.2
from __future__ import annotations

from typing import Optional

from sila2.framework.errors.defined_execution_error import DefinedExecutionError

from .schedulingservice_feature import SchedulingServiceFeature


class MissingAlgorithmError(DefinedExecutionError):
    def __init__(self, message: str | None = None):
        if message is None:
            message = "This algorithm either does not exist or is not available"
        super().__init__(SchedulingServiceFeature.defined_execution_errors["MissingAlgorithmError"], message=message)


class ComputationError(DefinedExecutionError):
    def __init__(self, message: str | None = None):
        if message is None:
            message = "The scheduler failed to compute a schedule."
        super().__init__(SchedulingServiceFeature.defined_execution_errors["ComputationError"], message=message)
