Source code for laborchestrator.sila_server.generated.pausecontroller.pausecontroller_errors
# Generated by sila2.code_generator; sila2.__version__: 0.10.3
from __future__ import annotations
from typing import Optional
from sila2.framework.errors.defined_execution_error import DefinedExecutionError
from .pausecontroller_feature import PauseControllerFeature
[docs]
class InvalidCommandExecutionUUID(DefinedExecutionError):
def __init__(self, message: Optional[str] = None):
if message is None:
message = "The given Command Execution UUID does not specify a command that is currently being executed."
super().__init__(
PauseControllerFeature.defined_execution_errors["InvalidCommandExecutionUUID"], message=message
)
[docs]
class InvalidCommandState(DefinedExecutionError):
def __init__(self, message: Optional[str] = None):
if message is None:
message = "The specified command is not in a valid state to perform the operation (Pause or Resume)."
super().__init__(PauseControllerFeature.defined_execution_errors["InvalidCommandState"], message=message)
[docs]
class OperationNotSupported(DefinedExecutionError):
def __init__(self, message: Optional[str] = None):
if message is None:
message = "The operation (Pause or Resume) is not supported for the SiLA 2 command which the\n specified Command Execution UUID belongs to."
super().__init__(PauseControllerFeature.defined_execution_errors["OperationNotSupported"], message=message)