forked from FISCO-BCOS/python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbcoserror.py
More file actions
81 lines (59 loc) · 1.81 KB
/
bcoserror.py
File metadata and controls
81 lines (59 loc) · 1.81 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
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
bcosliteclientpy is a python client for FISCO BCOS2.0 (https://github.com/FISCO-BCOS/)
bcosliteclientpy is free software: you can redistribute it and/or modify it under the
terms of the MIT License as published by the Free Software Foundation. This project is
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Thanks for
authors and contributors of eth-abi, eth-account, eth-hash,eth-keys, eth-typing, eth-utils,
rlp, eth-rlp , hexbytes ... and relative projects
@author: kentzhang
@date: 2019-06
'''
class BcosError(Exception):
code = None
data = None
message = None
def __init__(self, code, data, msg):
self.code = code
self.data = data
self.message = msg
def info(self):
return "code :{},data :{},message : {}".format(self.code, self.data, self.message)
class BcosException(Exception):
"""
the exception should be catched
"""
def __init__(self, msg=None):
super().__init__(msg)
class PrecompileError(BcosException):
"""
PrecompileError
"""
def __init__(self, msg=None):
super().__init__(msg)
class ArgumentsError(BcosException):
"""
ArgumentsError
"""
def __init__(self, msg=None):
super().__init__(msg)
class CompileError(BcosException):
"""
CompileError
"""
def __init__(self, msg=None):
super().__init__(msg)
class CompilerNotFound(BcosException):
"""
CompileError
"""
def __init__(self, msg=None):
super().__init__(msg)
class ChannelException(BcosException):
"""
exception when init channel
"""
def __init__(self, msg=None):
super().__init__(msg)