-
Notifications
You must be signed in to change notification settings - Fork 11
/
exceptions.py
53 lines (29 loc) · 916 Bytes
/
exceptions.py
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
from datetime import datetime, timezone
class QolsysException(Exception):
STATE = None
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._at = datetime.now(timezone.utc).isoformat()
if self.STATE:
self.STATE.last_exception = self
@property
def at(self):
return self._at
class QolsysGwConfigIncomplete(QolsysException):
pass
class QolsysGwConfigError(QolsysException):
pass
class UnableToParseEventException(QolsysException):
pass
class UnableToParseSensorException(QolsysException):
pass
class UnknownQolsysControlException(QolsysException):
pass
class UnknownQolsysEventException(QolsysException):
pass
class UnknownQolsysSensorException(QolsysException):
pass
class MissingUserCodeException(QolsysException):
pass
class InvalidUserCodeException(QolsysException):
pass