MCPcopy Index your code
hub / github.com/maruel/panicparse / wrapPanic

Function wrapPanic

stack/example_test.go:292–297  ·  view source on GitHub ↗

wrapPanic is a http.Handler middleware that traps panics and print it out to os.Stdout.

(h http.Handler)

Source from the content-addressed store, hash-verified

290// wrapPanic is a http.Handler middleware that traps panics and print it out to
291// os.Stdout.
292func 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}

Callers 1

Calls 1

recoverPanicFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…