Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for panicCh (0.28 sec)

  1. src/reflect/value.go

    	if f == 0 {
    		panic(&ValueError{valueMethodName(), Invalid})
    	}
    	// Assignable if addressable and not read-only.
    	if f&flagRO != 0 {
    		panic("reflect: " + valueMethodName() + " using value obtained using unexported field")
    	}
    	if f&flagAddr == 0 {
    		panic("reflect: " + valueMethodName() + " using unaddressable value")
    	}
    }
    
    // Addr returns a pointer value representing the address of v.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  2. src/reflect/all_test.go

    		r := recover()
    		if r == nil {
    			panic("did not panic")
    		}
    		if expect != "" {
    			var s string
    			switch r := r.(type) {
    			case string:
    				s = r
    			case *ValueError:
    				s = r.Error()
    			default:
    				panic(fmt.Sprintf("panicked with unexpected type %T", r))
    			}
    			if !strings.HasPrefix(s, "reflect") {
    				panic(`panic string does not start with "reflect": ` + s)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  3. doc/go1.17_spec.html

    </pre>
    
    <h3 id="Handling_panics">Handling panics</h3>
    
    <p> Two built-in functions, <code>panic</code> and <code>recover</code>,
    assist in reporting and handling <a href="#Run_time_panics">run-time panics</a>
    and program-defined error conditions.
    </p>
    
    <pre class="grammar">
    func panic(interface{})
    func recover() interface{}
    </pre>
    
    <p>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
  4. src/net/http/server.go

    // first, and then reply.
    //
    // Except for reading the body, handlers should not modify the
    // provided Request.
    //
    // If ServeHTTP panics, the server (the caller of ServeHTTP) assumes
    // that the effect of the panic was isolated to the active request.
    // It recovers the panic, logs a stack trace to the server error log,
    // and either closes the network connection or sends an HTTP/2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  5. src/database/sql/sql_test.go

    			if x == nil {
    				t.Fatal("expected panic")
    			}
    			conn.closemu.Lock()
    			closed := conn.dc == nil
    			conn.closemu.Unlock()
    			if !closed {
    				t.Fatal("expected connection to be closed after panic")
    			}
    		}()
    		err = conn.Raw(func(dc any) error {
    			panic("Conn.Raw panic should return an error")
    		})
    		t.Fatal("expected panic from Raw func")
    	}()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/test/callback.go

    	}
    	defer func() {
    		s := recover()
    		if s == nil {
    			t.Fatal("did not panic")
    		}
    		if s.(string) != "callback panic" {
    			t.Fatal("wrong panic:", s)
    		}
    		if !lockedOSThread() {
    			t.Fatal("lost lock on OS thread after panic")
    		}
    	}()
    	nestedCall(func() { panic("callback panic") })
    	panic("nestedCall returned")
    }
    
    // Callback with zero arguments used to make the stack misaligned,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 111.5K bytes
    - Viewed (0)
  7. src/net/http/serve_test.go

    		if err != nil {
    			panic(err)
    		}
    		for i := 0; i < n; i++ {
    			res, err := Get(url)
    			if err != nil {
    				log.Panicf("Get: %v", err)
    			}
    			all, err := io.ReadAll(res.Body)
    			res.Body.Close()
    			if err != nil {
    				log.Panicf("ReadAll: %v", err)
    			}
    			body := string(all)
    			if body != "Hello world.\n" {
    				log.Panicf("Got body: %q", body)
    			}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  8. src/database/sql/sql.go

    // If Register is called twice with the same name or if driver is nil,
    // it panics.
    func Register(name string, driver driver.Driver) {
    	driversMu.Lock()
    	defer driversMu.Unlock()
    	if driver == nil {
    		panic("sql: Register driver is nil")
    	}
    	if _, dup := drivers[name]; dup {
    		panic("sql: Register called twice for driver " + name)
    	}
    	drivers[name] = driver
    }
    
    func unregisterAllDrivers() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 103.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go

    		panic(err)
    	}
    
    	res, err := schema.NewStructural(convertedProps)
    	if err != nil {
    		panic(err)
    	}
    	return res
    }
    
    // Creates an *unstructured by decoding the given YAML. Panics on error
    func mustUnstructured(source string) interface{} {
    	source = FixTabsOrDie(source)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 17:14:10 UTC 2024
    - 159.9K bytes
    - Viewed (0)
  10. CHANGELOG/CHANGELOG-1.4.md

    # optionally, remove the old secret
    kubectl delete secret --namespace=federation federation-apiserver-secret
    ```
    
    - Kubernetes components no longer handle panics, and instead actively crash.  All Kubernetes components should be run by something that actively restarts them. This is true of the default setups, but those with custom environments may need to double-check (#28800, @lavalamp)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 24 02:28:26 UTC 2020
    - 133.5K bytes
    - Viewed (0)
Back to top