wide/util/panic.go

15 lines
216 B
Go

package util
import (
"runtime/debug"
"github.com/golang/glog"
)
// Recover recovers a panic.
func Recover() {
if re := recover(); re != nil {
glog.Errorf("PANIC RECOVERED:\n %v, %s", re, debug.Stack())
}
}