Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for WriteError (0.12 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. src/compress/flate/inflate.go

    }
    
    // A WriteError reports an error encountered while writing output.
    //
    // Deprecated: No longer returned.
    type WriteError struct {
    	Offset int64 // byte offset where error occurred
    	Err    error // error returned by underlying Write
    }
    
    func (e *WriteError) Error() string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 23:20:03 UTC 2023
    - 20.4K bytes
    - Viewed (0)
  9. pkg/test/echo/server/forwarder/http.go

    func processHTTPResponse(requestID int, httpResp *http.Response, outBuffer *bytes.Buffer) error {
    	// Make sure we close the body before exiting.
    	defer func() {
    		if err := httpResp.Body.Close(); err != nil {
    			echo.WriteError(outBuffer, requestID, err)
    		}
    	}()
    
    	echo.StatusCodeField.WriteForRequest(outBuffer, requestID, strconv.Itoa(httpResp.StatusCode))
    
    	// Read the entire body.
    	data, err := io.ReadAll(httpResp.Body)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 13:56:46 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/syntax/printer.go

    	p := printer{
    		output:     w,
    		form:       form,
    		linebreaks: form == 0,
    	}
    
    	defer func() {
    		n = p.written
    		if e := recover(); e != nil {
    			err = e.(writeError).err // re-panics if it's not a writeError
    		}
    	}()
    
    	p.print(x)
    	p.flush(_EOF)
    
    	return
    }
    
    // String is a convenience function that prints n in ShortForm
    // and returns the printed string.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 07:17:27 UTC 2023
    - 21.5K bytes
    - Viewed (0)
Back to top