diff options
author | Michael Pratt <mpratt@google.com> | 2020-06-10 12:37:01 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-10 12:38:20 -0700 |
commit | fadbfd83d9e7f7b00fcffdaf8532e006327c74ad (patch) | |
tree | cbdc08453178efda7717ca4d1c7773f3ff1a58d1 /pkg/p9/server.go | |
parent | 6d43ac9574a16b09a6e6bc9907d4a0270be54b2f (diff) |
Include panic message in log
PiperOrigin-RevId: 315745386
Diffstat (limited to 'pkg/p9/server.go')
-rw-r--r-- | pkg/p9/server.go | 4 |
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 |