소스 검색

添加接口

yjp 3 년 전
부모
커밋
5a1b3df407
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      errors.go

+ 4 - 0
errors.go

@@ -88,6 +88,10 @@ func (err *Error) Error() string {
 	return errMsg
 }
 
+func (err *Error) WithStack() error {
+	return errors.WithStack(err)
+}
+
 func newError(code uint32, message string) *Error {
 	return &Error{
 		code:  code,