|
1 | | -# Copyright (C) 2011 Sven Petai <[email protected]> |
2 | | -# Use of this source code is governed by the MIT license found in the LICENSE file. |
| 1 | +""" Copyright (C) 2011 Sven Petai <[email protected]>, use of this source code is governed by the MIT license found in the LICENSE file.""" |
3 | 2 |
|
4 | 3 |
|
5 | 4 | class PlugwiseException(Exception): |
6 | 5 | """Base error class for this Plugwise library""" |
7 | 6 |
|
8 | | - pass |
9 | 7 |
|
10 | 8 | ### Stick exceptions ### |
11 | 9 |
|
12 | 10 |
|
13 | 11 | class PortError(PlugwiseException): |
14 | 12 | """Connection to USBstick failed""" |
15 | 13 |
|
16 | | - pass |
17 | | - |
18 | 14 |
|
19 | 15 | class StickInitError(PlugwiseException): |
20 | 16 | """Initialization of USBstick failed""" |
21 | 17 |
|
22 | | - pass |
23 | | - |
24 | 18 |
|
25 | 19 | class NetworkDown(PlugwiseException): |
26 | 20 | """Zigbee network not online""" |
27 | 21 |
|
28 | | - pass |
29 | | - |
30 | 22 |
|
31 | 23 | class CirclePlusError(PlugwiseException): |
32 | 24 | """Connection to Circle+ node failed""" |
33 | 25 |
|
34 | | - pass |
35 | | - |
36 | 26 |
|
37 | 27 | class ProtocolError(PlugwiseException): |
38 | 28 | """Error while decode received data""" |
39 | 29 |
|
40 | | - pass |
41 | | - |
42 | 30 |
|
43 | 31 | class TimeoutException(PlugwiseException): |
44 | 32 | """Timeout expired while waiting for response from node""" |
45 | 33 |
|
46 | | - pass |
47 | | - |
48 | 34 |
|
49 | 35 | ### Smile exceptions ### |
50 | 36 |
|
51 | 37 |
|
52 | 38 | class ConnectionFailedError(PlugwiseException): |
53 | 39 | """Raised when unable to connect.""" |
54 | 40 |
|
55 | | - pass |
56 | | - |
57 | 41 |
|
58 | 42 | class InvalidAuthentication(PlugwiseException): |
59 | 43 | """Raised when unable to authenticate.""" |
60 | 44 |
|
61 | | - pass |
62 | | - |
63 | 45 |
|
64 | 46 | class UnsupportedDeviceError(PlugwiseException): |
65 | 47 | """Raised when device is not supported.""" |
66 | 48 |
|
67 | | - pass |
68 | | - |
69 | 49 |
|
70 | 50 | class DeviceSetupError(PlugwiseException): |
71 | 51 | """Raised when device is missing critical setup data.""" |
72 | 52 |
|
73 | | - pass |
74 | | - |
75 | 53 |
|
76 | 54 | class DeviceTimeoutError(PlugwiseException): |
77 | 55 | """Raised when device is not supported.""" |
78 | 56 |
|
79 | | - pass |
80 | | - |
81 | 57 |
|
82 | 58 | class ErrorSendingCommandError(PlugwiseException): |
83 | 59 | """Raised when device is not accepting the command.""" |
84 | 60 |
|
85 | | - pass |
86 | | - |
87 | 61 |
|
88 | 62 | class ResponseError(PlugwiseException): |
89 | 63 | """Raised when empty or error in response returned.""" |
90 | 64 |
|
91 | | - pass |
92 | | - |
93 | 65 |
|
94 | 66 | class InvalidXMLError(PlugwiseException): |
95 | 67 | """Raised when response holds incomplete or invalid XML data.""" |
96 | 68 |
|
97 | | - pass |
98 | | - |
99 | 69 |
|
100 | 70 | class XMLDataMissingError(PlugwiseException): |
101 | 71 | """Raised when xml data is empty.""" |
102 | | - |
103 | | - pass |
0 commit comments