Skip to content

Commit

Permalink
Restore changes to avoid conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
keelung-yang committed Apr 24, 2023
1 parent 471d7fc commit fad194a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions can/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
+-- CanInitializationError
+-- CanOperationError
+-- CanTimeoutError
+-- CanBitRateError
Keep in mind that some functions and methods may raise different exceptions.
For example, validating typical arguments and parameters might result in a
Expand Down Expand Up @@ -111,6 +112,15 @@ class CanTimeoutError(CanError, TimeoutError):
"""


class CanBitRateError(CanError):
"""Indicates the invalid / unsupported bitrate.
Example scenarios:
- Invalid / unsupported bitrate on bus
- Can't convert between bit timing and bitrate
"""


@contextmanager
def error_check(
error_message: Optional[str] = None,
Expand Down
2 changes: 2 additions & 0 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ Lookup table of interface names:
+---------------------+-------------------------------------+
| ``"vector"`` | :doc:`interfaces/vector` |
+---------------------+-------------------------------------+
| ``"zlg"`` | :doc:`interfaces/zlg` |
+---------------------+-------------------------------------+
| ``"virtual"`` | :doc:`interfaces/virtual` |
+---------------------+-------------------------------------+

Expand Down
1 change: 1 addition & 0 deletions doc/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ The following hardware interfaces are included in python-can:
interfaces/systec
interfaces/usb2can
interfaces/vector
interfaces/zlg


Additional interface types can be added via the :ref:`plugin interface`, or by installing a third party package that utilises the :ref:`plugin interface`.

0 comments on commit fad194a

Please sign in to comment.