Skip to content

Commit

Permalink
Add robot disconnected exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Afonso-2403 committed Jun 12, 2023
1 parent 4eed193 commit 2502982
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 @@ -18,6 +18,7 @@ class ErrorReason(str, Enum):
RobotMapException: str = "robot_map_exception"
RobotTransformException: str = "robot_transform_exception"
RobotUnknownErrorException: str = "robot_unknown_error_exception"
RobotDisconnectedException: str = "robot_disconnected_exception"


@dataclass
Expand Down Expand Up @@ -207,3 +208,14 @@ def __init__(self, error_description: str) -> None:
)

pass


# An exception which should be thrown by the robot package if the robot is not connected to the cloud
class RobotDisconnectedException(RobotException):
def __init__(self, error_description: str) -> None:
super().__init__(
error_reason=ErrorReason.RobotDisconnectedException,
error_description=error_description,
)

pass

0 comments on commit 2502982

Please sign in to comment.