Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for writeErrors (0.14 sec)

  1. staging/src/k8s.io/apiserver/pkg/server/filters/timeout_test.go

    	origReallyCrash := runtime.ReallyCrash
    	runtime.ReallyCrash = false
    	defer func() {
    		runtime.ReallyCrash = origReallyCrash
    	}()
    
    	sendResponse := make(chan string, 1)
    	doPanic := make(chan interface{}, 1)
    	writeErrors := make(chan error, 1)
    	gotPanic := make(chan interface{}, 1)
    	timeout := make(chan time.Time, 1)
    	resp := "test response"
    	timeoutErr := apierrors.NewServerTimeout(schema.GroupResource{Group: "foo", Resource: "bar"}, "get", 0)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  2. subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/configurations/renderer/ConsoleConfigurationReportRenderer.java

        }
    
        private void writeConfiguration(ReportConfiguration config) {
            writeConfigurationNameHeader(config, spec.getReportedTypeAlias());
            writeDescription(config.getDescription());
    
            writeErrors(config.getLenientErrors());
    
            if (!config.getAttributes().isEmpty() ||
                (spec.isIncludeCapabilities() && !config.getCapabilities().isEmpty()) ||
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 12 16:17:12 UTC 2022
    - 18.3K bytes
    - Viewed (0)
  3. src/net/http/serve_test.go

    func testTimeoutHandler(t *testing.T, mode testMode) {
    	sendHi := make(chan bool, 1)
    	writeErrors := make(chan error, 1)
    	sayHi := HandlerFunc(func(w ResponseWriter, r *Request) {
    		<-sendHi
    		_, werr := w.Write([]byte("hi"))
    		writeErrors <- werr
    	})
    	ctx, cancel := context.WithCancel(context.Background())
    	h := NewTestTimeoutHandler(sayHi, cancelableTimeoutContext{ctx})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  4. pkg/kubelet/server/server.go

    	if err != nil {
    		utilruntime.HandleError(err)
    		response.WriteError(http.StatusBadRequest, err)
    		return
    	}
    	pod, ok := s.host.GetPodByName(params.podNamespace, params.podName)
    	if !ok {
    		response.WriteError(http.StatusNotFound, fmt.Errorf("pod does not exist"))
    		return
    	}
    	if len(params.podUID) > 0 && pod.UID != params.podUID {
    		response.WriteError(http.StatusNotFound, fmt.Errorf("pod not found"))
    		return
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 40.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/syntax/dumper.go

    	p := dumper{
    		output: w,
    		ptrmap: make(map[Node]int),
    		last:   '\n', // force printing of line number on first line
    	}
    
    	defer func() {
    		if e := recover(); e != nil {
    			err = e.(writeError).err // re-panics if it's not a writeError
    		}
    	}()
    
    	if n == nil {
    		p.printf("nil\n")
    		return
    	}
    	p.dump(reflect.ValueOf(n), n)
    	p.printf("\n")
    
    	return
    }
    
    type dumper struct {
    	output io.Writer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 08 17:32:14 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  6. pkg/test/echo/server/endpoint/http.go

    	} else {
    		h.echo(w, r, id)
    	}
    }
    
    // nolint: interfacer
    func writeError(out *bytes.Buffer, msg string) {
    	epLog.Warn(msg)
    	_, _ = out.WriteString(msg + "\n")
    }
    
    func (h *httpHandler) echo(w http.ResponseWriter, r *http.Request, id uuid.UUID) {
    	body := bytes.Buffer{}
    
    	if err := r.ParseForm(); err != nil {
    		writeError(&body, "ParseForm() error: "+err.Error())
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 16:20:31 UTC 2023
    - 12.8K bytes
    - Viewed (0)
  7. platforms/core-configuration/configuration-cache/src/main/kotlin/org/gradle/internal/cc/impl/problems/JsonModelWriter.kt

                    property("documentationLink", documentationLinkFor(it))
                }
                details.failure?.let { failure ->
                    comma()
                    writeError(failure)
                }
            }
        }
    
        private
        fun writeError(failure: DecoratedFailure) {
            val summary = failure.summary
            val parts = failure.parts
            property("error") {
                jsonObject {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  8. pkg/test/echo/fields.go

    	f.WriteForRequest(out, requestID, key+":"+value)
    }
    
    func WriteBodyLine(out io.StringWriter, requestID int, line string) {
    	_, _ = out.WriteString(fmt.Sprintf("[%d body] %s\n", requestID, line))
    }
    
    func WriteError(out io.StringWriter, requestID int, err error) {
    	_, _ = out.WriteString(fmt.Sprintf("[%d error] %v\n", requestID, err))
    }
    
    const (
    	RequestIDField        Field = "X-Request-Id"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 16:20:31 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  9. src/text/template/exec.go

    	})
    }
    
    // writeError is the wrapper type used internally when Execute has an
    // error writing to its output. We strip the wrapper in errRecover.
    // Note that this is not an implementation of error, so it cannot escape
    // from the package as an error value.
    type writeError struct {
    	Err error // Original error.
    }
    
    func (s *state) writeError(err error) {
    	panic(writeError{
    		Err: err,
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:22:24 UTC 2024
    - 32K bytes
    - Viewed (0)
  10. pkg/kubelet/server/stats/handler.go

    // request is provided for logging.
    func handleError(response *restful.Response, request string, err error) {
    	switch err {
    	case kubecontainer.ErrContainerNotFound:
    		response.WriteError(http.StatusNotFound, err)
    	default:
    		msg := fmt.Sprintf("Internal Error: %v", err)
    		klog.ErrorS(err, "HTTP InternalServerError serving", "request", request)
    		response.WriteErrorString(http.StatusInternalServerError, msg)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 14 21:31:38 UTC 2023
    - 6.8K bytes
    - Viewed (0)
Back to top