// Internal error handler for the multiple places that could cause a crashing error.
Internal error handler for the multiple places that could cause a crashing error.
// Internal error handler for the multiple places that could cause a crashing error .
func handleError(m *Milo, w http.ResponseWriter, r *http.Request) {
	if err := recover(); err != nil {
		m.logger.LogInterfaces("milo.Route", r.URL.RequestURI(), err, mux.Vars(r))
		m.logger.LogStackTrace()
		if m.defaultErrorHandler != nil {
			m.defaultErrorHandler(w, r)
		} else {
			http.Error(w, "500 - Internal Server Error.", http.StatusInternalServerError)
		}
	}
}
func handleError ( m * Milo , w http . ResponseWriter , r * http . Request ) { if err := recover ( ) ; err != nil { m . logger . LogInterfaces ( " " , r . URL . RequestURI ( ) , err , mux . Vars ( r ) ) m . logger . LogStackTrace ( ) if m . defaultErrorHandler != nil { m . defaultErrorHandler ( w , r ) } else { http . Error ( w , " " , http . StatusInternalServerError ) } } }
Internal error handler for the multiple places that could cause a crashing error.
Internal error handler for the multiple places that could cause a crashing error .