good morning!!!!

Skip to content
Snippets Groups Projects
Commit 7806d775 authored by a's avatar a
Browse files

add printing recoverer

parent 869880a2
No related branches found
Tags v0.0.32
No related merge requests found
...@@ -24,6 +24,7 @@ func Recoverer(next jrpc.Handler) jrpc.Handler { ...@@ -24,6 +24,7 @@ func Recoverer(next jrpc.Handler) jrpc.Handler {
fn := func(w jrpc.ResponseWriter, r *jrpc.Request) { fn := func(w jrpc.ResponseWriter, r *jrpc.Request) {
defer func() { defer func() {
if rvr := recover(); rvr != nil { if rvr := recover(); rvr != nil {
PrintPrettyStack(rvr)
w.Send(nil, errors.New("Internal Server Error")) w.Send(nil, errors.New("Internal Server Error"))
} }
}() }()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment