Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

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

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

"""Custom Exceptions for DGILib.""" 

 

 

class Error(Exception): 

"""Base class for exceptions in this module. 

 

:param msg: Error message associated with the exception 

:type msg: str 

:ivar msg: Error message associated with the exception 

""" 

 

def __init__(self, msg): 

"""__init__.""" 

self.msg = msg 

 

def __str__(self): 

"""__str__.""" 

return self.msg 

 

 

class DLLError(Error): 

"""Exception raised opening dgilib.dll. 

 

dgilib.dll could not be found in the specified path. 

""" 

 

pass 

 

 

class DeviceIndexError(Error): 

"""Exception raised selecting device. 

 

The device_index exceeds the device_count. 

""" 

 

pass 

 

 

class DeviceReturnError(Error): 

"""Exception raised: DGILib returned non-zero value.""" 

 

pass 

 

 

class DeviceConnectionError(Error): 

"""Exception raised: Could not connect to the device.""" 

 

pass 

 

 

class DeviceArgumentError(Error): 

"""Exception raised parsing arguments.""" 

 

pass