PanicHandler


PanicHandler function to handle panics.

Example:

func myPanicHandler() http.HandlerFunc {
    return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
        http.Error(w, "custom panic message", 500)
    })
}

router := violetear.New()
router.PanicHandler = myPanicHandler()
comments powered by Disqus