跳转至

异常

此处定义了一些异常类

InvalidStrengthData

InvalidStrengthData(strength_data: str)

Bases: Exception

强度数据不合法

Source code in pydglab_ws/exceptions.py
12
13
def __init__(self, strength_data: str):
    super().__init__(f"Invalid strength data: {strength_data}")

InvalidFeedbackData

InvalidFeedbackData(feedback_data: str)

Bases: Exception

App 反馈按钮数据不合法

Source code in pydglab_ws/exceptions.py
19
20
def __init__(self, feedback_data: str):
    super().__init__(f"Invalid strength data: {feedback_data}")

InvalidPulseOperation

InvalidPulseOperation(pulse_operation: Any)

Bases: Exception

波形操作数据不合法

Source code in pydglab_ws/exceptions.py
26
27
def __init__(self, pulse_operation: Any):
    super().__init__(f"Invalid pulse operation: {pulse_operation}")

PulseDataTooLong

PulseDataTooLong(length: int)

Bases: Exception

波形操作数据列表过长

Source code in pydglab_ws/exceptions.py
33
34
def __init__(self, length: int):
    super().__init__(f"Pulse data too long: {length}")