Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 885 for panicIP (0.23 sec)

  1. src/slices/slices_test.go

    		{"with out-of-bounds index and = cap", a[:1:2], 2, b[:]},
    		{"with out-of-bounds index and < cap", a[:1:3], 2, b[:]},
    	} {
    		if !panics(func() { _ = Insert(test.s, test.i, test.v...) }) {
    			t.Errorf("Insert %s: got no panic, want panic", test.name)
    		}
    	}
    }
    
    var deleteTests = []struct {
    	s    []int
    	i, j int
    	want []int
    }{
    	{
    		[]int{1, 2, 3},
    		0,
    		0,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  2. src/go/types/selection.go

    // f requires a non-pointer receiver but x.a.b.c is a pointer value.
    //
    // All pointer indirections, whether due to implicit or explicit field
    // selections or * operations inserted for "pointerness", panic if
    // applied to a nil pointer, so a method call x.f() may panic even
    // before the function call.
    //
    // By contrast, a MethodExpr operation T.f is essentially equivalent
    // to a function literal of the form:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  3. src/slices/iter.go

    // All sub-slices are clipped to have no capacity beyond the length.
    // If s is empty, the sequence is empty: there is no empty slice in the sequence.
    // Chunk panics if n is less than 1.
    func Chunk[Slice ~[]E, E any](s Slice, n int) iter.Seq[Slice] {
    	if n < 1 {
    		panic("cannot be less than 1")
    	}
    
    	return func(yield func(Slice) bool) {
    		for i := 0; i < len(s); i += n {
    			// Clamp the last chunk to the slice bound as necessary.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:40:32 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  4. src/runtime/error.go

    type stringer interface {
    	String() string
    }
    
    // printpanicval prints an argument passed to panic.
    // If panic is called with a value that has a String or Error method,
    // it has already been converted into a string by preprintpanics.
    //
    // To ensure that the traceback can be unambiguously parsed even when
    // the panic value contains "\ngoroutine" and other stack-like
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:10:41 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  5. src/runtime/debug/stack.go

    // fatal crash message.
    type CrashOptions struct {
    	/* for future expansion */
    }
    
    // SetCrashOutput configures a single additional file where unhandled
    // panics and other fatal errors are printed, in addition to standard error.
    // There is only one additional file: calling SetCrashOutput again overrides
    // any earlier call.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:19:04 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  6. src/slices/iter_test.go

    		name string
    		x    []struct{}
    		n    int
    	}{
    		{
    			name: "cannot be less than 1",
    			x:    make([]struct{}, 0),
    			n:    0,
    		},
    	} {
    		if !panics(func() { _ = Chunk(test.x, test.n) }) {
    			t.Errorf("Chunk %s: got no panic, want panic", test.name)
    		}
    	}
    }
    
    func TestChunkRange(t *testing.T) {
    	// Verify Chunk iteration can be stopped.
    	var got [][]int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:28:50 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  7. src/go/ast/print.go

    // localError wraps locally caught errors so we can distinguish
    // them from genuine panics which we don't want to return as errors.
    type localError struct {
    	err error
    }
    
    // printf is a convenience wrapper that takes care of print errors.
    func (p *printer) printf(format string, args ...any) {
    	if _, err := fmt.Fprintf(p, format, args...); err != nil {
    		panic(localError{err})
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/cel/environment/base.go

    // strictCost is used to determine whether to enforce strict cost calculation for CEL expressions.
    func MustBaseEnvSet(ver *version.Version, strictCost bool) *EnvSet {
    	if ver == nil {
    		panic("version must be non-nil")
    	}
    	if len(ver.Components()) < 2 {
    		panic(fmt.Sprintf("version must contain an major and minor component, but got: %s", ver.String()))
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 15 15:51:08 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  9. src/internal/trace/reader_test.go

    		for {
    			ev, err := r.ReadEvent()
    			if err != nil {
    				break
    			}
    
    			if !testGetters {
    				continue
    			}
    			// Make sure getters don't do anything that panics
    			switch ev.Kind() {
    			case trace.EventLabel:
    				ev.Label()
    			case trace.EventLog:
    				ev.Log()
    			case trace.EventMetric:
    				ev.Metric()
    			case trace.EventRangeActive, trace.EventRangeBegin:
    				ev.Range()
    			case trace.EventRangeEnd:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  10. src/runtime/crash_test.go

    	output := runTestProg(t, "testprog", "RecursivePanic3")
    	want := `panic: first panic
    
    `
    	if !strings.HasPrefix(output, want) {
    		t.Fatalf("output does not start with %q:\n%s", want, output)
    	}
    
    }
    
    func TestRecursivePanic4(t *testing.T) {
    	output := runTestProg(t, "testprog", "RecursivePanic4")
    	want := `panic: first panic [recovered]
    	panic: second panic
    `
    	if !strings.HasPrefix(output, want) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 19:46:10 UTC 2024
    - 27K bytes
    - Viewed (0)
Back to top