Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (15 sloc) 0.41 kb
package airbrake
import (
"net/http"
)
// CapturePanicHandler "middleware".
// Wraps the http handler so that all panics will be dutifully reported to airbrake
//
// Example:
// http.HandleFunc("/", airbrake.CapturePanicHandler(MyServerFunc))
func CapturePanicHandler(app http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
defer CapturePanic(r)
app(w, r)
}
}
Jump to Line
Something went wrong with that request. Please try again.