forked from codonlibrary/codonPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.py
More file actions
56 lines (35 loc) · 1.23 KB
/
Copy pathexceptions.py
File metadata and controls
56 lines (35 loc) · 1.23 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
55
56
from requests.exceptions import ConnectionError
class MESHAuthenticationError(ConnectionError):
"""The MESH request authentication was invalid"""
@property
def msg(self):
return "Invalid authentication"
class MESHMessageMissing(ConnectionError):
"""The message requested does not exist"""
@property
def msg(self):
return "Message does not exist"
class MESHMessageAlreadyDownloaded(ConnectionError):
"""The MESH request has already been downloaded"""
@property
def msg(self):
return "Message already downloaded"
class MESHDownloadErrors(Exception):
"""There were errors downloading MESH messages"""
def __init__(self, exceptions):
self.exceptions = exceptions
class MESHInvalidRecipient(ConnectionError):
"""The recipient is unknown or otherwise invalid"""
@property
def msg(self):
return "Invalid recipient"
class MESHMultipleMatches(ConnectionError):
"""There are multiple messages with the provided local ID"""
@property
def msg(self):
return "Multiple messages found"
class MESHUnknownError(ConnectionError):
"""There was an unknown error with the connection"""
@property
def msg(self):
return "Unknown"