DAQ: added in magnet_positon sensor exception_handler.py
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user