2014-09-26 13:36:12 +04:00
|
|
|
package util
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime/debug"
|
|
|
|
|
|
|
|
"github.com/golang/glog"
|
|
|
|
)
|
|
|
|
|
2014-10-29 13:15:18 +03:00
|
|
|
// Recover recovers a panic.
|
2014-09-26 13:36:12 +04:00
|
|
|
func Recover() {
|
|
|
|
if re := recover(); re != nil {
|
|
|
|
glog.Errorf("PANIC RECOVERED:\n %v, %s", re, debug.Stack())
|
|
|
|
}
|
|
|
|
}
|