Skip to content

Commit

Permalink
Add robot mission not supported exception
Browse files Browse the repository at this point in the history
  • Loading branch information
andchiind committed Feb 20, 2024
1 parent afdbeb6 commit aa14eeb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/robot_interface/models/exceptions/robot_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ErrorReason(str, Enum):
RobotTransformException: str = "robot_transform_exception"
RobotUnknownErrorException: str = "robot_unknown_error_exception"
RobotDisconnectedException: str = "robot_disconnected_exception"

RobotMissionNotSupportedException: str = "robot_mission_not_supported_exception"

@dataclass
class ErrorMessage:
Expand Down Expand Up @@ -219,3 +219,13 @@ def __init__(self, error_description: str) -> None:
)

pass

# An exception which should be thrown by the robot package if the robot is given a mission type it cannot run, such as a localisation mission
class RobotMissionNotSupportedException(RobotException):
def __init__(self, error_description: str) -> None:
super().__init__(
error_reason=ErrorReason.RobotMissionNotSupportedException,
error_description=error_description,
)

pass

0 comments on commit aa14eeb

Please sign in to comment.