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 5fa0374 commit 038285e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/robot_interface/models/exceptions/robot_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +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
Expand Down Expand Up @@ -219,3 +220,14 @@ 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 038285e

Please sign in to comment.