Lvnszn commented on code in PR #121:
URL: https://github.com/apache/dubbo-getty/pull/121#discussion_r1616886463
##########
session.go:
##########
@@ -381,7 +381,9 @@ func (s *session) WritePkg(pkg interface{}, timeout
time.Duration) (int, int, er
const size = 64 << 10
rBuf := make([]byte, size)
rBuf = rBuf[:runtime.Stack(rBuf, false)]
- log.Errorf("[session.WritePkg] panic session %s:
err=%s\n%s", s.sessionToken(), r, rBuf)
+ errMsg := fmt.Sprintf("[session.WritePkg] panic session
%s: err=%s\n%s", s.sessionToken(), r, rBuf)
+ log.Error(errMsg)
+ err = perrors.WithStack(fmt.Errorf(errMsg))
Review Comment:
可以先赋值成 error,然后 log 出来
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]