DAQ: added in magnet_positon sensor exception_handler.py

This commit is contained in:
2026-04-02 15:40:00 +02:00
parent 0a943e2963
commit 85e67f2f5c
+12
View File
@@ -296,5 +296,17 @@ class AerotechCommunicationError(Exception):
},
)
def __str__(self) -> str:
return self.message
class MagnetPositionSensorErorr(Exception):
def __init__(self, message: str = "Magnet position sensor error"):
super().__init__(message)
self.message = message
logger.error(
message,
extra={"device": "magnet_position_sensor"},
)
def __str__(self) -> str:
return self.message