Skip to content

Commit e56720d

Browse files
Merge pull request #78 from michealroberts/feature/errors/BaseProtocolReadError
feat: add BaseProtocolReadError to errors in samps module
2 parents b656025 + 553d79a commit e56720d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/samps/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .baudrate import BAUDRATE_LOOKUP_FLAGS, BAUDRATES, BaudrateType
2222
from .crc import get_cyclic_redundancy_checksum
2323
from .errors import (
24+
BaseProtocolReadError,
2425
SerialReadError,
2526
SerialTimeoutError,
2627
SerialWriteError,
@@ -54,6 +55,7 @@
5455
"BAUDRATES",
5556
"BaudrateType",
5657
"BaseInterface",
58+
"BaseProtocolReadError",
5759
"Serial",
5860
"SerialAsyncCommonInterface",
5961
"SerialCommonInterface",

src/samps/errors.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
# **************************************************************************************
77

88

9+
class BaseProtocolReadError(Exception):
10+
"""
11+
Exception class for base protocol read errors.
12+
"""
13+
14+
def __init__(self, message: str) -> None:
15+
super().__init__(message)
16+
17+
18+
# **************************************************************************************
19+
20+
921
class SerialReadError(Exception):
1022
"""
1123
Exception class for serial read errors.

0 commit comments

Comments
 (0)