Update errors

This commit is contained in:
Simon Alibert
2025-03-04 11:24:05 +01:00
parent 2b24feb604
commit f6c1049474
2 changed files with 0 additions and 27 deletions

View File

@@ -1,9 +1,3 @@
class ConnectionError(Exception):
"""Base exception class for connection errors."""
pass
class DeviceNotConnectedError(ConnectionError):
"""Exception raised when the device is not connected."""

View File

@@ -28,24 +28,3 @@ def safe_disconnect(func):
raise e
return wrapper
class RobotDeviceNotConnectedError(Exception):
"""Exception raised when the robot device is not connected."""
def __init__(
self, message="This robot device is not connected. Try calling `robot_device.connect()` first."
):
self.message = message
super().__init__(self.message)
class RobotDeviceAlreadyConnectedError(Exception):
"""Exception raised when the robot device is already connected."""
def __init__(
self,
message="This robot device is already connected. Try not calling `robot_device.connect()` twice.",
):
self.message = message
super().__init__(self.message)