Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for critical (0.3 sec)

  1. cmd/generic-handlers.go

    // `panic(logger.ErrCritical)` as done by `logger.CriticalIf`.
    //
    // It should be always the first / highest HTTP handler.
    func setCriticalErrorHandler(h http.Handler) http.Handler {
    	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		defer func() {
    			if rec := recover(); rec == logger.ErrCritical { // handle
    				stack := debug.Stack()
    				logger.Error("critical: \"%s %s\": %v\n%s", r.Method, r.URL, rec, string(stack))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 01:08:52 GMT 2024
    - 20.7K bytes
    - Viewed (0)
Back to top