mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 04:19:18 +08:00
ddcb2b5349
Signed-off-by: Binbin Lv <binbin.lv@zilliz.com>
35 lines
853 B
Python
35 lines
853 B
Python
from enum import Enum
|
|
from pymilvus import ExceptionsMessage
|
|
|
|
|
|
class ErrorCode(Enum):
|
|
ErrorOk = 0
|
|
Error = 1
|
|
|
|
|
|
ErrorMessage = {ErrorCode.ErrorOk: "",
|
|
ErrorCode.Error: "is illegal"}
|
|
|
|
|
|
class ErrorMap:
|
|
def __init__(self, err_code, err_msg):
|
|
self.err_code = err_code
|
|
self.err_msg = err_msg
|
|
|
|
|
|
class ConnectionErrorMessage(ExceptionsMessage):
|
|
FailConnect = "Fail connecting to server on %s:%s. Timeout"
|
|
ConnectExist = "The connection named %s already creating, but passed parameters don't match the configured parameters"
|
|
|
|
|
|
class CollectionErrorMessage(ExceptionsMessage):
|
|
CollNotLoaded = "collection %s was not loaded into memory"
|
|
|
|
|
|
class PartitionErrorMessage(ExceptionsMessage):
|
|
pass
|
|
|
|
|
|
class IndexErrorMessage(ExceptionsMessage):
|
|
WrongFieldName = "cannot create index on non-vector field: %s"
|