Skip to content

Commit 5bcbc56

Browse files
Merge pull request #79 from michealroberts/feature/errors/BaseProtocolTimeoutError
feat: add BaseProtocolTimeoutError to errors in samps module
2 parents e56720d + 5d804fe commit 5bcbc56

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
@@ -22,6 +22,7 @@
2222
from .crc import get_cyclic_redundancy_checksum
2323
from .errors import (
2424
BaseProtocolReadError,
25+
BaseProtocolTimeoutError,
2526
SerialReadError,
2627
SerialTimeoutError,
2728
SerialWriteError,
@@ -56,6 +57,7 @@
5657
"BaudrateType",
5758
"BaseInterface",
5859
"BaseProtocolReadError",
60+
"BaseProtocolTimeoutError",
5961
"Serial",
6062
"SerialAsyncCommonInterface",
6163
"SerialCommonInterface",

src/samps/errors.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ def __init__(self, message: str) -> None:
1818
# **************************************************************************************
1919

2020

21+
class BaseProtocolTimeoutError(Exception):
22+
"""
23+
Exception class for base protocol timeout errors.
24+
"""
25+
26+
def __init__(self, message: str) -> None:
27+
super().__init__(message)
28+
29+
30+
# **************************************************************************************
31+
32+
2133
class SerialReadError(Exception):
2234
"""
2335
Exception class for serial read errors.

0 commit comments

Comments
 (0)