wrapPanic is a http.Handler middleware that traps panics and print it out to os.Stdout.
(h http.Handler)
| 290 | // wrapPanic is a http.Handler middleware that traps panics and print it out to |
| 291 | // os.Stdout. |
| 292 | func wrapPanic(h http.Handler) http.Handler { |
| 293 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 294 | defer recoverPanic() |
| 295 | h.ServeHTTP(w, r) |
| 296 | }) |
| 297 | } |
no test coverage detected
searching dependent graphs…