Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 39 for errorHandler (0.26 sec)

  1. src/net/http/httputil/reverseproxy_test.go

    		wantCode       int
    		errorHandler   func(http.ResponseWriter, *http.Request, error)
    		transport      http.RoundTripper // defaults to failingRoundTripper
    		modifyResponse func(*http.Response) error
    	}{
    		{
    			name:     "default",
    			wantCode: http.StatusBadGateway,
    		},
    		{
    			name:         "errorhandler",
    			wantCode:     http.StatusTeapot,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 54.6K bytes
    - Viewed (0)
  2. src/go/scanner/scanner.go

    	"go/token"
    	"path/filepath"
    	"strconv"
    	"unicode"
    	"unicode/utf8"
    )
    
    // An ErrorHandler may be provided to [Scanner.Init]. If a syntax error is
    // encountered and a handler was installed, the handler is called with a
    // position and an error message. The position points to the beginning of
    // the offending token.
    type ErrorHandler func(pos token.Position, msg string)
    
    // A Scanner holds the scanner's internal state while processing
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 24.3K bytes
    - Viewed (0)
  3. platforms/core-runtime/messaging/src/integTest/groovy/org/gradle/internal/remote/internal/hub/MessageHubIntegrationTest.groovy

    import java.util.concurrent.CountDownLatch
    import java.util.concurrent.LinkedBlockingQueue
    
    @Timeout(60)
    class MessageHubIntegrationTest extends ConcurrentSpec {
        final Action<Throwable> errorHandler = Mock()
    
        def "can wire two hubs together"() {
            Dispatch<String> clientHandler = Mock()
            Dispatch<String> serverHandler = Mock()
            def server = new Participant()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:59:22 UTC 2023
    - 9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/endpoints/filters/request_deadline_test.go

    		t.Run(test.name, func(t *testing.T) {
    			var (
    				errorHandlerCallCountGot int
    				rwGot                    http.ResponseWriter
    				requestGot               *http.Request
    			)
    
    			errorHandler := http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
    				http.Error(rw, "error serving request", http.StatusBadRequest)
    
    				errorHandlerCallCountGot++
    				requestGot = req
    				rwGot = rw
    			})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 14 23:04:34 UTC 2022
    - 16.7K bytes
    - Viewed (0)
  5. src/fmt/scan.go

    			v.SetComplex(s.scanComplex(verb, v.Type().Bits()))
    		default:
    			s.errorString("can't scan type: " + val.Type().String())
    		}
    	}
    }
    
    // errorHandler turns local panics into error returns.
    func errorHandler(errp *error) {
    	if e := recover(); e != nil {
    		if se, ok := e.(scanError); ok { // catch local error
    			*errp = se.err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:56:20 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  6. cmd/handler-utils.go

    	// proxying the request to another node.
    	for k := range w.Header() {
    		w.Header().Del(k)
    	}
    
    	f := handlers.NewForwarder(&handlers.Forwarder{
    		PassHost:     true,
    		RoundTripper: ep.Transport,
    		ErrorHandler: func(w http.ResponseWriter, r *http.Request, err error) {
    			success = false
    			if err != nil && !errors.Is(err, context.Canceled) {
    				replLogIf(GlobalContext, err)
    			}
    		},
    	})
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go

    		// the custom responder might be used for providing a unified error reporting
    		// or supporting retry mechanisms by not sending non-fatal errors to the clients
    		proxy.ErrorHandler = h.Responder.Error
    	}
    	proxy.ServeHTTP(w, newReq)
    }
    
    type noSuppressPanicError struct{}
    
    func (noSuppressPanicError) Write(p []byte) (n int, err error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:10:30 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  8. cmd/kube-proxy/app/server.go

    }
    
    // Creates a new filesystem watcher and adds watches for the config file.
    func (o *Options) initWatcher() error {
    	fswatcher := filesystem.NewFsnotifyWatcher()
    	err := fswatcher.Init(o.eventHandler, o.errorHandler)
    	if err != nil {
    		return err
    	}
    	err = fswatcher.AddWatch(o.ConfigFile)
    	if err != nil {
    		return err
    	}
    	o.watcher = fswatcher
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 13:27:41 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  9. api/go1.11.txt

    pkg net/http/httptrace, type ClientTrace struct, WroteHeaderField func(string, []string)
    pkg net/http/httputil, type ReverseProxy struct, ErrorHandler func(http.ResponseWriter, *http.Request, error)
    pkg os, const ModeIrregular = 524288
    pkg os, const ModeIrregular FileMode
    pkg os, const ModeType = 2399666176
    pkg os, func UserCacheDir() (string, error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 22 03:48:56 UTC 2018
    - 25K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/syntax/parser.go

    package syntax
    
    import (
    	"fmt"
    	"go/build/constraint"
    	"io"
    	"strconv"
    	"strings"
    )
    
    const debug = false
    const trace = false
    
    type parser struct {
    	file  *PosBase
    	errh  ErrorHandler
    	mode  Mode
    	pragh PragmaHandler
    	scanner
    
    	base      *PosBase // current position base
    	first     error    // first error encountered
    	errcnt    int      // number of errors encountered
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
Back to top