Skip to content

Commit 748b8a4

Browse files
Merge pull request #80 from michealroberts/feature/errors/BaseProtocolWriteError
feat: add BaseProtocolWriteError to errors in samps module
2 parents 5bcbc56 + fe9be3a commit 748b8a4

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
@@ -23,6 +23,7 @@
2323
from .errors import (
2424
BaseProtocolReadError,
2525
BaseProtocolTimeoutError,
26+
BaseProtocolWriteError,
2627
SerialReadError,
2728
SerialTimeoutError,
2829
SerialWriteError,
@@ -58,6 +59,7 @@
5859
"BaseInterface",
5960
"BaseProtocolReadError",
6061
"BaseProtocolTimeoutError",
62+
"BaseProtocolWriteError",
6163
"Serial",
6264
"SerialAsyncCommonInterface",
6365
"SerialCommonInterface",

src/samps/errors.py

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

3232

33+
class BaseProtocolWriteError(Exception):
34+
"""
35+
Exception class for base protocol write errors.
36+
"""
37+
38+
def __init__(self, message: str) -> None:
39+
super().__init__(message)
40+
41+
42+
# **************************************************************************************
43+
44+
3345
class SerialReadError(Exception):
3446
"""
3547
Exception class for serial read errors.

0 commit comments

Comments
 (0)