-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexceptions.py
109 lines (57 loc) · 1.8 KB
/
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
class PyNanoCoinException(Exception):
"""Base exception class for all project-specific exceptions."""
pass
class ParseErrorBadMagicNumber(PyNanoCoinException):
pass
class ParseErrorBadNetworkId(PyNanoCoinException):
pass
class ParseErrorBadMessageType(PyNanoCoinException):
pass
class ParseErrorBadIPv6(PyNanoCoinException):
pass
class ParseErrorBadMessageBody(PyNanoCoinException):
pass
class ParseErrorBadBlockSend(PyNanoCoinException):
pass
class ParseErrorBadBlockReceive(PyNanoCoinException):
pass
class ParseErrorBadBlockOpen(PyNanoCoinException):
pass
class ParseErrorBadBlockChange(PyNanoCoinException):
pass
class ParseErrorBadBlockChange(PyNanoCoinException):
pass
class ParseErrorBadBlockState(PyNanoCoinException):
pass
class ParseErrorBadBulkPullResponse(PyNanoCoinException):
pass
class ParseErrorInvalidTypeInJson(PyNanoCoinException):
pass
class BadBlockHash(PyNanoCoinException):
pass
class SocketClosedByPeer(PyNanoCoinException):
pass
class InvalidBlockHash(PyNanoCoinException):
pass
class HandshakeExchangeFail(PyNanoCoinException):
pass
class CommsError(PyNanoCoinException):
pass
class BadTelemetryReply(PyNanoCoinException):
pass
class PeerServiceUnavailable(PyNanoCoinException):
pass
class FrontierServiceSlowPeer(PyNanoCoinException):
pass
class BlacklistItemTypeError(PyNanoCoinException):
pass
class VerificationErrorNoAccount(PyNanoCoinException):
pass
class NoBlocksPulled(PyNanoCoinException):
pass
class FrontierIteratorFail(PyNanoCoinException):
pass
class UnknownPacketType(CommsError):
def __init__(self, message_type: int, message: str = None):
self.message_type = message_type
super(UnknownPacketType, self).__init__(message)