Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for panicIP (0.21 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/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)
  7. 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)
  8. 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)
  9. src/cmd/go/internal/load/pkg.go

    // to loadPackageData.
    func (pre *preload) flush() {
    	// flush is usually deferred.
    	// Don't hang program waiting for workers on panic.
    	if v := recover(); v != nil {
    		panic(v)
    	}
    
    	close(pre.cancel)
    	for i := 0; i < preloadWorkerCount; i++ {
    		pre.sema <- struct{}{}
    	}
    }
    
    func cleanImport(path string) string {
    	orig := path
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 28 17:00:51 UTC 2024
    - 120K bytes
    - Viewed (0)
  10. src/net/http/transport_test.go

    		Proxy: func(*Request) (*url.URL, error) { panic("") },
    		OnProxyConnectResponse: func(ctx context.Context, proxyURL *url.URL, connectReq *Request, connectRes *Response) error {
    			return nil
    		},
    		DialContext:            func(ctx context.Context, network, addr string) (net.Conn, error) { panic("") },
    		Dial:                   func(network, addr string) (net.Conn, error) { panic("") },
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
Back to top