Skip to content

Commit

Permalink
TWEAK: Include the URL in panic messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
cypriss committed Aug 30, 2014
1 parent 7abdf3b commit f7762fe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions router_serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ func (rootRouter *Router) handlePanic(rw *AppResponseWriter, req *Request, err i
stack := make([]byte, size)
stack = stack[:runtime.Stack(stack, false)]

ERROR.Printf("%v\n", err)
ERROR.Printf("%s\n", string(stack))
ERROR.Printf("PANIC: \nURL: %v\nERROR: %v\nSTACK: %s\n", req.URL, err, string(stack))
}

func invoke(handler reflect.Value, ctx reflect.Value, values []reflect.Value) {
Expand Down

0 comments on commit f7762fe

Please sign in to comment.