Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 432 for panicIP (0.27 sec)

  1. src/runtime/testdata/testexithooks/testexithooks.go

    	flag.Parse()
    	switch *modeflag {
    	case "simple":
    		testSimple()
    	case "goodexit":
    		testGoodExit()
    	case "badexit":
    		testBadExit()
    	case "panics":
    		testPanics()
    	case "callsexit":
    		testHookCallsExit()
    	case "exit2":
    		testExit2()
    	default:
    		panic("unknown mode")
    	}
    }
    
    func testSimple() {
    	f1 := func() { println("foo") }
    	f2 := func() { println("bar") }
    	exithook.Add(exithook.Hook{F: f1})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. src/internal/trace/value.go

    // to that possibility.
    func (v Value) Kind() ValueKind {
    	return v.kind
    }
    
    // Uint64 returns the uint64 value for a MetricSampleUint64.
    //
    // Panics if this metric sample's Kind is not MetricSampleUint64.
    func (v Value) Uint64() uint64 {
    	if v.kind != ValueUint64 {
    		panic("Uint64 called on Value of a different Kind")
    	}
    	return v.scalar
    }
    
    // valueAsString produces a debug string value.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  3. src/math/rand/rand.go

    // from the default [Source].
    // It panics if n <= 0.
    func Int63n(n int64) int64 { return globalRand().Int63n(n) }
    
    // Int31n returns, as an int32, a non-negative pseudo-random number in the half-open interval [0,n)
    // from the default [Source].
    // It panics if n <= 0.
    func Int31n(n int32) int32 { return globalRand().Int31n(n) }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:09:08 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  4. src/sync/waitgroup.go

    		// Need to model this as a read, because there can be
    		// several concurrent wg.counter transitions from 0.
    		race.Read(unsafe.Pointer(&wg.sema))
    	}
    	if v < 0 {
    		panic("sync: negative WaitGroup counter")
    	}
    	if w != 0 && delta > 0 && v == int32(delta) {
    		panic("sync: WaitGroup misuse: Add called concurrently with Wait")
    	}
    	if v > 0 || w == 0 {
    		return
    	}
    	// This goroutine has set counter to 0 when waiters > 0.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 4K bytes
    - Viewed (0)
  5. src/runtime/ehooks_test.go

    			},
    			{
    				mode:     "goodexit",
    				expected: "orange apple",
    			},
    			{
    				mode:     "badexit",
    				expected: "blub blix",
    			},
    			{
    				mode: "panics",
    				musthave: []string{
    					"fatal error: exit hook invoked panic",
    					"main.testPanics",
    				},
    			},
    			{
    				mode: "callsexit",
    				musthave: []string{
    					"fatal error: exit hook invoked exit",
    				},
    			},
    			{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  6. src/cmd/distpack/pack.go

    		log.Fatal(err)
    	}
    	reportHash(name)
    }
    
    // check panics if err is not nil. Otherwise it returns x.
    // It is only meant to be used in a function that has deferred
    // a function to recover appropriately from the panic.
    func check[T any](x T, err error) T {
    	check1(err)
    	return x
    }
    
    // check1 panics if err is not nil.
    // It is only meant to be used in a function that has deferred
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  7. src/errors/wrap.go

    // An error type might provide an As method so it can be treated as if it were a
    // different error type.
    //
    // As panics if target is not a non-nil pointer to either a type that implements
    // error, or to any interface type.
    func As(err error, target any) bool {
    	if err == nil {
    		return false
    	}
    	if target == nil {
    		panic("errors: target cannot be nil")
    	}
    	val := reflectlite.ValueOf(target)
    	typ := val.Type()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:13:04 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. 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)
  9. src/vendor/golang.org/x/crypto/sha3/sha3.go

    	d.state = spongeSqueezing
    	d.n = d.rate
    	copyOut(d, d.storage[:d.rate])
    }
    
    // Write absorbs more data into the hash's state. It panics if any
    // output has already been read.
    func (d *state) Write(p []byte) (written int, err error) {
    	if d.state != spongeAbsorbing {
    		panic("sha3: Write after Read")
    	}
    	written = len(p)
    
    	for len(p) > 0 {
    		if d.n == 0 && len(p) >= d.rate {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  10. src/runtime/os3_plan9.go

    		if pc != 0 && !findfunc(pc).valid() && findfunc(*(*uintptr)(unsafe.Pointer(sp))).valid() {
    			pc = 0
    		}
    
    		// IF LR exists, sigpanictramp must save it to the stack
    		// before entry to sigpanic so that panics in leaf
    		// functions are correctly handled. This will smash
    		// the stack frame but we're not going back there
    		// anyway.
    		if usesLR {
    			c.savelr(c.lr())
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top