Этот коммит содержится в:
Alexander UR6LKW
2025-05-23 16:07:52 +03:00
родитель 70ed9938b2
Коммит 9a34e930dd
8 изменённых файлов: 134 добавлений и 110 удалений
+25
Просмотреть файл
@@ -0,0 +1,25 @@
class DMRPFieldOutOfRangeException(Exception):
"""
Exception raised when a packet field value is out of the allowed or expected range.
Attributes:
field: The name or identifier of the problematic field.
typename: The expected type or range description for the field.
"""
def __init__(self, field, typename) -> None:
super().__init__(f"Field out of range: {field} must be {typename}")
class DMRPUnknownPacketTypeException(Exception):
"""
Exception raised when the packet factory cannot recognize the packet type
from the given input data.
"""
pass
class DMRPBadPacket(Exception):
"""
Exception raised when a packet is structurally invalid or corrupted.
"""
pass