/
exceptions.py
41 lines (26 loc) · 892 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
'''
Created on 2018/7/2
:author: hubo
'''
class ModuleAPICallTimeoutException(Exception):
pass
class APIRejectedException(Exception):
pass
class StaleResultException(Exception):
def __init__(self, result, desc = "Result is stale"):
Exception.__init__(self, desc)
self.result = result
class AsyncTransactionLockException(Exception):
def __init__(self, info = None):
Exception.__init__(self)
self.info = info
class TransactionFailedException(Exception):
pass
class TransactionRetryExceededException(TransactionFailedException):
def __init__(self):
TransactionFailedException.__init__(self, "Max retry exceeded")
class TransactionTimeoutException(TransactionFailedException):
def __init__(self):
TransactionFailedException.__init__(self, "Timeout exceeded")
class WalkKeyNotRetrieved(KeyError):
pass