MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / NewError

Function NewError

IceFireDB-SQLProxy/pkg/mysql/mysql/error.go:46–59  ·  view source on GitHub ↗
(errCode uint16, message string)

Source from the content-addressed store, hash-verified

44}
45
46func NewError(errCode uint16, message string) *MyError {
47 e := new(MyError)
48 e.Code = errCode
49
50 if s, ok := MySQLState[errCode]; ok {
51 e.State = s
52 } else {
53 e.State = DEFAULT_MYSQL_STATE
54 }
55
56 e.Message = message
57
58 return e
59}
60
61func ErrorCode(errMsg string) (code int) {
62 var tmpStr string

Callers 3

writeErrorMethod · 0.50
handleStmtExecuteMethod · 0.50
HandleOtherCommandMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected