File: exceptions.py

package info (click to toggle)
python-can 3.0.0%2Bgithub-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,892 kB
  • sloc: python: 8,014; makefile: 29; sh: 12
file content (31 lines) | stat: -rw-r--r-- 726 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# coding: utf-8

"""
Ctypes wrapper module for IXXAT Virtual CAN Interface V3 on win32 systems

Copyright (C) 2016 Giuseppe Corbelli <giuseppe.corbelli@weightpack.com>
"""

from can import CanError

__all__ = ['VCITimeout', 'VCIError', 'VCIRxQueueEmptyError', 'VCIDeviceNotFoundError']


class VCITimeout(CanError):
    """ Wraps the VCI_E_TIMEOUT error """
    pass


class VCIError(CanError):
    """ Try to display errors that occur within the wrapped C library nicely. """
    pass


class VCIRxQueueEmptyError(VCIError):
    """ Wraps the VCI_E_RXQUEUE_EMPTY error """
    def __init__(self):
        super(VCIRxQueueEmptyError, self).__init__("Receive queue is empty")


class VCIDeviceNotFoundError(CanError):
    pass