summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2020-06-10 12:37:01 -0700
committergVisor bot <gvisor-bot@google.com>2020-06-10 12:38:20 -0700
commitfadbfd83d9e7f7b00fcffdaf8532e006327c74ad (patch)
treecbdc08453178efda7717ca4d1c7773f3ff1a58d1 /pkg
parent6d43ac9574a16b09a6e6bc9907d4a0270be54b2f (diff)
Include panic message in log
PiperOrigin-RevId: 315745386
Diffstat (limited to 'pkg')
-rw-r--r--pkg/p9/server.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/p9/server.go b/pkg/p9/server.go
index fdfa83648..60cf94fa1 100644
--- a/pkg/p9/server.go
+++ b/pkg/p9/server.go
@@ -482,10 +482,10 @@ func (cs *connState) handle(m message) (r message) {
defer func() {
if r == nil {
// Don't allow a panic to propagate.
- recover()
+ err := recover()
// Include a useful log message.
- log.Warningf("panic in handler: %s", debug.Stack())
+ log.Warningf("panic in handler: %v\n%s", err, debug.Stack())
// Wrap in an EFAULT error; we don't really have a
// better way to describe this kind of error. It will