func NewTransErrorWithMsg(typeID int32, message string) *TransError {
	return &TransError{message: message, typeID: typeID}
}
NewTransErrorWithMsg to build TransError with typeID and errMsg
package remote
import "errors"
const (
	UnknownApplicationException = 0
	UnknownMethod               = 1
	InvalidMessageTypeException = 2
	WrongMethodName             = 3
	BadSequenceID               = 4
	MissingResult               = 5
	InternalError               = 6
	ProtocolError               = 7
	InvalidTransform            = 8
	InvalidProtocol             = 9
	UnsupportedClientType       = 10
)
var defaultTransErrorMessage = map[int32]string{
	UnknownApplicationException: "unknown application exception",
	UnknownMethod:               "unknown method",
	InvalidMessageTypeException: "invalid message type",
	WrongMethodName:             "wrong method name",
	BadSequenceID:               "bad sequence ID",
	MissingResult:               "missing result",
	InternalError:               "unknown internal error",
	ProtocolError:               "unknown protocol error",
	InvalidTransform:            "Invalid transform",
	InvalidProtocol:             "Invalid protocol",
	UnsupportedClientType:       "Unsupported client type",
}
type TransError struct {
	message string
	typeID  int32
	rawErr  error
}
func (e TransError) Error() string {
	if e.message != "" {
		return e.message
	}
	return defaultTransErrorMessage[e.typeID]
}
func (e TransError) TypeID() int32 {
	return e.typeID
}
func (e TransError) Unwrap() error {
	return e.rawErr
}
func (e TransError) Is(target error) bool {
	return e == target || errors.Is(e.rawErr, target)
}