Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 3,023 for panics (0.2 sec)

  1. 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)
  2. pkg/config/schema/resource/schema.go

    	// Validate the schema.
    	if err := s.Validate(); err != nil {
    		return nil, err
    	}
    
    	return s, nil
    }
    
    // MustBuild calls Build and panics if it fails.
    func (b Builder) MustBuild() Schema {
    	s, err := b.Build()
    	if err != nil {
    		panic(fmt.Sprintf("MustBuild: %v", err))
    	}
    	return s
    }
    
    // BuildNoValidate builds the Schema without checking the fields.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 19 22:42:42 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  3. 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)
  4. staging/src/k8s.io/apimachinery/pkg/util/runtime/runtime.go

    		fn(ctx, r)
    	}
    	if ReallyCrash {
    		// Actually proceed to panic.
    		panic(r)
    	}
    }
    
    // logPanic logs the caller tree when a panic occurs (except in the special case of http.ErrAbortHandler).
    func logPanic(ctx context.Context, r interface{}) {
    	if r == http.ErrAbortHandler {
    		// honor the http.ErrAbortHandler sentinel panic value:
    		//   ErrAbortHandler is a sentinel panic value to abort a handler.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types/pkg.go

    		return s
    	}
    	str := InternString(name)
    	return pkg.Lookup(str)
    }
    
    // LookupNum looks up the symbol starting with prefix and ending with
    // the decimal n. If prefix is too long, LookupNum panics.
    func (pkg *Pkg) LookupNum(prefix string, n int) *Sym {
    	var buf [20]byte // plenty long enough for all current users
    	copy(buf[:], prefix)
    	b := strconv.AppendInt(buf[:len(prefix)], int64(n), 10)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 16:28:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    // If the current Node is not part of a slice, Delete panics.
    // As a special case, if the current node is a package file,
    // Delete removes it from the package's Files map.
    func (c *Cursor) Delete() {
    	if _, ok := c.node.(*ast.File); ok {
    		delete(c.parent.(*ast.Package).Files, c.name)
    		return
    	}
    
    	i := c.Index()
    	if i < 0 {
    		panic("Delete node not contained in slice")
    	}
    	v := c.field()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/analysis.go

    	// -- facts --
    
    	// ImportObjectFact retrieves a fact associated with obj.
    	// Given a value ptr of type *T, where *T satisfies Fact,
    	// ImportObjectFact copies the value to *ptr.
    	//
    	// ImportObjectFact panics if called after the pass is complete.
    	// ImportObjectFact is not concurrency-safe.
    	ImportObjectFact func(obj types.Object, fact Fact) bool
    
    	// ImportPackageFact retrieves a fact associated with package pkg,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  8. src/math/big/prime_test.go

    			t.Errorf("#%d composite found to be prime (%s)", i, s)
    		}
    	}
    
    	// check that ProbablyPrime panics if n <= 0
    	c := NewInt(11) // a prime
    	for _, n := range []int{-1, 0, 1} {
    		func() {
    			defer func() {
    				if n < 0 && recover() == nil {
    					t.Fatalf("expected panic from ProbablyPrime(%d)", n)
    				}
    			}()
    			if !c.ProbablyPrime(n) {
    				t.Fatalf("%v should be a prime", c)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 12:54:00 UTC 2019
    - 7.1K bytes
    - Viewed (0)
  9. src/runtime/signal_riscv64.go

    func (c *sigctxt) preparePanic(sig uint32, gp *g) {
    	// We arrange RA, and pc to pretend the panicking
    	// function calls sigpanic directly.
    	// Always save RA to stack so that panics in leaf
    	// functions are correctly handled. This smashes
    	// the stack frame but we're not going back there
    	// anyway.
    	sp := c.sp() - goarch.PtrSize
    	c.set_sp(sp)
    	*(*uint64)(unsafe.Pointer(uintptr(sp))) = c.ra()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 04 02:55:17 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  10. src/runtime/signal_mipsx.go

    func (c *sigctxt) preparePanic(sig uint32, gp *g) {
    	// We arrange link, and pc to pretend the panicking
    	// function calls sigpanic directly.
    	// Always save LINK to stack so that panics in leaf
    	// functions are correctly handled. This smashes
    	// the stack frame but we're not going back there
    	// anyway.
    	sp := c.sp() - sys.MinFrameSize
    	c.set_sp(sp)
    	*(*uint32)(unsafe.Pointer(uintptr(sp))) = c.link()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 3.1K bytes
    - Viewed (0)
Back to top