func (e StackCode) GetClientData() interface{} {
	return ClientData(e.Err)
}
GetClientData returns the ClientData of the underlying Err.
package errcode
import (
	"github.com/pingcap/errors"
)
func StackTrace(err error) errors.StackTrace {
	if tracer := errors.GetStackTracer(err); tracer != nil {
		return tracer.StackTrace()
	}
	return nil
}
type StackCode struct {
	Err      ErrorCode
	GetStack errors.StackTracer
}
func (e StackCode) StackTrace() errors.StackTrace {
	return e.GetStack.StackTrace()
}
func NewStackCode(err ErrorCode, position ...int) StackCode {
	if err == nil {
		panic("NewStackCode: given error is nil")
	}
	stackPosition := 1
	if len(position) > 0 {
		stackPosition = position[0]
	}
	if tracer := errors.GetStackTracer(err); tracer != nil {
		return StackCode{Err: err, GetStack: tracer}
	}
	return StackCode{Err: err, GetStack: errors.NewStack(stackPosition)}
}
func (e StackCode) Cause() error {
	return e.Err
}
func (e StackCode) Error() string {
	return e.Err.Error()
}
func (e StackCode) Code() Code {
	return e.Err.Code()
}