Skip to content

Commit f7762fe

Browse files
committed
TWEAK: Include the URL in panic messages.
1 parent 7abdf3b commit f7762fe

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

router_serve.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,7 @@ func (rootRouter *Router) handlePanic(rw *AppResponseWriter, req *Request, err i
241241
stack := make([]byte, size)
242242
stack = stack[:runtime.Stack(stack, false)]
243243

244-
ERROR.Printf("%v\n", err)
245-
ERROR.Printf("%s\n", string(stack))
244+
ERROR.Printf("PANIC: \nURL: %v\nERROR: %v\nSTACK: %s\n", req.URL, err, string(stack))
246245
}
247246

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

0 commit comments

Comments
 (0)