Skip to content
Snippets Groups Projects
Unverified Commit 1fd6d3ce authored by Jackson's avatar Jackson Committed by GitHub
Browse files

improve moerr to support mo-error's unified format and reporting (#4490)

mo has its own error code/message, and need to adapt mysql error code.
- define `moErrorMsgItem{errorCode, mysqlErrorCode, errorMsgOrFormat}` to handle `moErrorCode->mysqlErrorCode` mapping rules
- define `New(errorCoe, args)` and `NewWithContext(context.Context, errorCode, args)` to handle error reporting
- modify reference of `moerr.ErrTxnClosed` error, as an example of `moerr.New(...)`
- predefine `Group 6: sql error` as sql error, which normally can be converted to mysql error code.

Approved by: @fengttt, @zhangxu19830126, @ouyuanning, @nnsgmsone
parent f764d467
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment