Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 691 for panics (0.43 sec)

  1. src/math/rand/v2/rand.go

    // It panics if n <= 0.
    func (r *Rand) Int64N(n int64) int64 {
    	if n <= 0 {
    		panic("invalid argument to Int64N")
    	}
    	return int64(r.uint64n(uint64(n)))
    }
    
    // Uint64N returns, as a uint64, a non-negative pseudo-random number in the half-open interval [0,n).
    // It panics if n == 0.
    func (r *Rand) Uint64N(n uint64) uint64 {
    	if n == 0 {
    		panic("invalid argument to Uint64N")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 02:25:49 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  2. src/syscall/js/js.go

    // It panics if v is not a JavaScript number.
    func (v Value) Int() int {
    	return int(v.float("Value.Int"))
    }
    
    // Bool returns the value v as a bool.
    // It panics if v is not a JavaScript boolean.
    func (v Value) Bool() bool {
    	switch v.ref {
    	case valueTrue.ref:
    		return true
    	case valueFalse.ref:
    		return false
    	default:
    		panic(&ValueError{"Value.Bool", v.Type()})
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 14:35:26 UTC 2024
    - 19.5K bytes
    - Viewed (0)
  3. src/iter/iter.go

    		yield := func(v1 V) bool {
    			if done {
    				return false
    			}
    			if !yieldNext {
    				panic("iter.Pull: yield called again before next")
    			}
    			yieldNext = false
    			v, ok = v1, true
    			race.Release(unsafe.Pointer(&racer))
    			coroswitch(c)
    			race.Acquire(unsafe.Pointer(&racer))
    			return !done
    		}
    		// Recover and propagate panics from seq.
    		defer func() {
    			if p := recover(); p != nil {
    				panicValue = p
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. src/log/slog/value.go

    }
    
    // Int64 returns v's value as an int64. It panics
    // if v is not a signed integer.
    func (v Value) Int64() int64 {
    	if g, w := v.Kind(), KindInt64; g != w {
    		panic(fmt.Sprintf("Value kind is %s, not %s", g, w))
    	}
    	return int64(v.num)
    }
    
    // Uint64 returns v's value as a uint64. It panics
    // if v is not an unsigned integer.
    func (v Value) Uint64() uint64 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:12:08 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  5. 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)
  6. src/internal/reflectlite/value.go

    	}
    	return f.Name()
    }
    
    // mustBeExported panics if f records that the value was obtained using
    // an unexported field.
    func (f flag) mustBeExported() {
    	if f == 0 {
    		panic(&ValueError{methodName(), 0})
    	}
    	if f&flagRO != 0 {
    		panic("reflect: " + methodName() + " using value obtained using unexported field")
    	}
    }
    
    // mustBeAssignable panics if f records that the value is not assignable,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  7. src/crypto/internal/boring/boring.go

    func init() {
    	C._goboringcrypto_BORINGSSL_bcm_power_on_self_test()
    	if C._goboringcrypto_FIPS_mode() != 1 {
    		panic("boringcrypto: not in FIPS mode")
    	}
    	sig.BoringCrypto()
    }
    
    // Unreachable marks code that should be unreachable
    // when BoringCrypto is in use. It panics.
    func Unreachable() {
    	panic("boringcrypto: invalid code execution")
    }
    
    // provided by runtime to avoid os import.
    func runtime_arg0() string
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  8. src/internal/reflectlite/export_test.go

    import (
    	"unsafe"
    )
    
    // Field returns the i'th field of the struct v.
    // It panics if v's Kind is not Struct or i is out of range.
    func Field(v Value, i int) Value {
    	if v.kind() != Struct {
    		panic(&ValueError{"reflect.Value.Field", v.kind()})
    	}
    	tt := (*structType)(unsafe.Pointer(v.typ()))
    	if uint(i) >= uint(len(tt.Fields)) {
    		panic("reflect: Field index out of range")
    	}
    	field := &tt.Fields[i]
    	typ := field.Typ
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go

    // If a handler already exists for pattern, Handle panics.
    func (m *PathRecorderMux) HandleFunc(path string, handler func(http.ResponseWriter, *http.Request)) {
    	m.Handle(path, http.HandlerFunc(handler))
    }
    
    // UnlistedHandle registers the handler for the given pattern, but doesn't list it.
    // If a handler already exists for pattern, Handle panics.
    func (m *PathRecorderMux) UnlistedHandle(path string, handler http.Handler) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 12 01:52:15 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  10. 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)
Back to top