Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 3,023 for panics (0.35 sec)

  1. test/zerodivide.go

    	ErrorTest{"int32 1/0", func() { use(k32 / j32) }, "divide"},
    	ErrorTest{"int64 1/0", func() { use(k64 / j64) }, "divide"},
    
    	// From issue 5790, we should ensure that _ assignments
    	// still evaluate and generate zerodivide panics.
    	ErrorTest{"int16 _ = bb[0]/bb[1]", func() { _ = bb[0] / bb[1] }, "divide"},
    
    	ErrorTest{"uint 0/0", func() { use(u / v) }, "divide"},
    	ErrorTest{"uint8 0/0", func() { use(u8 / v8) }, "divide"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 06 15:53:04 UTC 2021
    - 5.7K bytes
    - Viewed (0)
  2. src/html/template/template.go

    }
    
    // Must is a helper that wraps a call to a function returning ([*Template], error)
    // and panics if the error is non-nil. It is intended for use in variable initializations
    // such as
    //
    //	var t = template.Must(template.New("name").Parse("html"))
    func Must(t *Template, err error) *Template {
    	if err != nil {
    		panic(err)
    	}
    	return t
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 21:00:46 UTC 2024
    - 17K bytes
    - Viewed (0)
  3. pkg/registry/core/serviceaccount/storage/storage_test.go

    // Currently this getter only panics as the only test case doesn't actually need the getters to function.
    // When more test cases are added, this getter will need extending/replacing to have a real test implementation.
    type panicGetter struct{}
    
    func (f panicGetter) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
    	panic("not implemented")
    }
    
    var _ rest.Getter = panicGetter{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. pkg/util/goroutinemap/goroutinemap.go

    		operationPending: true,
    		expBackoff:       existingOp.expBackoff,
    	}
    	go func() (err error) {
    		// Handle unhandled panics (very unlikely)
    		defer k8sRuntime.HandleCrash()
    		// Handle completion of and error, if any, from operationFunc()
    		defer grm.operationComplete(operationName, &err)
    		// Handle panic, if any, from operationFunc()
    		defer k8sRuntime.RecoverFromPanic(&err)
    		return operationFunc()
    	}()
    
    	return nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 16 11:54:27 UTC 2020
    - 6.8K bytes
    - Viewed (0)
  5. 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)
  6. src/cmd/compile/internal/test/testdata/loadstore_test.go

    //
    //go:noinline
    func testDeadStorePanic_ssa(a int) (r int) {
    	defer func() {
    		recover()
    		r = a
    	}()
    	a = 2      // store
    	b := a - a // optimized to zero
    	c := 4
    	a = c / b // store, but panics
    	a = 3     // store
    	r = a
    	return
    }
    
    func testDeadStorePanic(t *testing.T) {
    	if want, got := 2, testDeadStorePanic_ssa(1); want != got {
    		t.Errorf("testDeadStorePanic failed.  want = %d, got = %d", want, got)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 17:54:15 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  7. src/runtime/signal_linux_s390x.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)
    	*(*uint64)(unsafe.Pointer(uintptr(sp))) = c.link()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 17 20:42:23 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  8. test/typeparam/chansimp.dir/a.go

    	case r := <-e.c:
    		return r, true
    	default:
    		return v, false
    	}
    }
    
    // Release updates and releases the value.
    // This method panics if the value has not been acquired.
    func (e *Exclusive[Val]) Release(v Val) {
    	select {
    	case e.c <- v:
    	default:
    		panic("Exclusive Release without Acquire")
    	}
    }
    
    // Ranger returns a Sender and a Receiver. The Receiver provides a
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 28 21:40:40 UTC 2021
    - 5.5K bytes
    - Viewed (0)
  9. cmd/metrics-v3-types.go

    // descriptors, this function panics.
    //
    // Panics if `labels` is not a list of ordered label name and label value pairs
    // or if all labels for the metric are not provided.
    func (m *MetricValues) Set(name MetricName, value float64, labels ...string) {
    	desc, ok := m.descriptors[name]
    	if !ok {
    		panic(fmt.Sprintf("metric has no description: %s", name))
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 23 07:41:18 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  10. src/crypto/crypto.go

    // into the program.
    func (h Hash) Size() int {
    	if h > 0 && h < maxHash {
    		return int(digestSizes[h])
    	}
    	panic("crypto: Size of unknown hash function")
    }
    
    var hashes = make([]func() hash.Hash, maxHash)
    
    // New returns a new hash.Hash calculating the given hash function. New panics
    // if the hash function is not linked into the binary.
    func (h Hash) New() hash.Hash {
    	if h > 0 && h < maxHash {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 6.8K bytes
    - Viewed (0)
Back to top