-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.py
More file actions
54 lines (36 loc) · 1.27 KB
/
exceptions.py
File metadata and controls
54 lines (36 loc) · 1.27 KB
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
"""Client library exceptions"""
class ConnectExceptions(Exception):
"""Internal protocol specific exception.
Contains exceptions which corresponds to DeviceConnectResponse.ResponseType.
"""
pass
class AlreadyConnected(ConnectExceptions):
"""Device with same name and type is already connected."""
pass
class ModuleNotSupported(ConnectExceptions):
"""Module is not supported by server (module gateway)."""
pass
class DeviceNotSupported(ConnectExceptions):
"""Device type not supported by module."""
pass
class HigherPriorityAlreadyConnected(ConnectExceptions):
"""Device of same type and higher priority is already connected."""
pass
class CommunicationExceptions(Exception):
"""Transport layer exceptions."""
pass
class ConnectionRefused(CommunicationExceptions):
"""Server refused to established communication socket."""
pass
class CommunicationError(CommunicationExceptions):
"""Invalid data was sent during communication."""
pass
class ServerTookTooLong(CommunicationExceptions):
"""Server timed out."""
pass
class NoCommandError(Exception):
"""No get_status called before get_command."""
pass
class ContextAlreadyDestroyed(Exception):
"""Context is destroyed and invalid."""
pass