NebulaGraph Python Client
5.3.0
Loading...
Searching...
No Matches
error.py
1
# Copyright 2025 vesoft-inc
2
#
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
# you may not use this file except in compliance with the License.
5
# You may obtain a copy of the License at
6
#
7
# http://www.apache.org/licenses/LICENSE-2.0
8
#
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS,
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14
15
from
typing
import
TYPE_CHECKING, Optional
16
17
from
nebulagraph_python._error_code
import
ErrorCode
18
19
if
TYPE_CHECKING:
20
from
nebulagraph_python.result_set
import
ResultSet
21
22
23
class
NebulaGraphRemoteError
(Exception):
24
code: ErrorCode
25
message: str
26
result: Optional[
"ResultSet"
]
27
28
def
__init__(
29
self, code: ErrorCode, message: str, result: Optional[
"ResultSet"
] =
None
30
):
31
self.
code
code
= code
32
self.
message
message
= message
33
self.
result
result
= result
34
super().__init__(f
"{code.value}: {message}"
)
35
36
37
class
NebulaGraphClientError
(Exception):
38
pass
39
40
41
class
InternalError(NebulaGraphClientError):
42
"""General internal error that cannot be recovered due to unexpected inputs or bugs"""
43
44
pass
45
46
47
class
ConnectingError
(
NebulaGraphClientError
):
48
"""Error raised when connecting to the server"""
49
50
pass
51
52
53
class AuthenticatingError(NebulaGraphClientError):
54
"""
Error raised when authenticating failed"""
55
56
pass
57
58
59
class ExecutingError(NebulaGraphClientError):
60
"""Error raised when executing a statement failed"""
61
62
pass
63
64
65
class PoolError(NebulaGraphClientError):
66
"""Error raised when pool is not healthy"""
67
68
pass
nebulagraph_python.error.ConnectingError
Definition
error.py:47
nebulagraph_python.error.NebulaGraphClientError
Definition
error.py:37
nebulagraph_python.error.NebulaGraphRemoteError
Definition
error.py:23
nebulagraph_python.error.NebulaGraphRemoteError.code
ErrorCode code
Definition
error.py:24
nebulagraph_python.error.NebulaGraphRemoteError.result
Optional result
Definition
error.py:26
nebulagraph_python.error.NebulaGraphRemoteError.result
result
Definition
error.py:33
nebulagraph_python.error.NebulaGraphRemoteError.message
str message
Definition
error.py:25
nebulagraph_python.error.NebulaGraphRemoteError.message
message
Definition
error.py:32
nebulagraph_python.error.NebulaGraphRemoteError.code
code
Definition
error.py:31
nebulagraph_python.result_set
Definition
result_set.py:1
src
nebulagraph_python
error.py
Generated by
1.9.8