- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 2,815 for panicCh (0.17 sec)
-
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) -
src/runtime/testdata/testprog/deadlock.go
}() panic("second panic") }() panic("first panic") } // Test case where a single defer recovers one panic but starts another panic. If // the second panic is never recovered, then the recovered first panic will still // appear on the panic stack (labeled '[recovered]') and the runtime stack. func RecursivePanic4() { defer func() { recover() panic("second panic") }() panic("first panic") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 27 20:44:24 UTC 2021 - 6.5K bytes - Viewed (0) -
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) -
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) -
src/cmd/go/testdata/script/test_fuzz.txt
stdout 'fuzz target' # Test that f.Error within f.Fuzz panics ! go test error_fuzz_fn_fuzz_test.go ! stdout ^ok ! stdout 'error here' stdout FAIL stdout 'fuzz target' # Test that f.Fail within f.Fuzz panics ! go test fail_fuzz_fn_fuzz_test.go ! stdout ^ok stdout FAIL stdout 'fuzz target' # Test that f.Skip within f.Fuzz panics ! go test skip_fuzz_fn_fuzz_test.go ! stdout ^ok ! stdout 'skip here' stdout FAIL
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 16 16:53:11 UTC 2023 - 10.2K bytes - Viewed (0) -
test/fixedbugs/issue15975.go
func nilInterfaceDeferCall() { var x Closer defer x.Close() // if it panics when evaluating x.Close, it should not reach here fail = true } func shouldPanic(f func()) { defer func() { if recover() == nil { panic("did not panic") } }() f() } func main() { shouldPanic(nilInterfaceDeferCall) if fail { panic("fail") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 08 20:35:53 UTC 2016 - 572 bytes - Viewed (0) -
src/crypto/internal/boring/boring_test.go
// and inheriting that code's tests. package boring import "testing" // Test that func init does not panic. func TestInit(t *testing.T) {} // Test that Unreachable panics. func TestUnreachable(t *testing.T) { defer func() { if Enabled { if err := recover(); err == nil { t.Fatal("expected Unreachable to panic") } } else { if err := recover(); err != nil { t.Fatalf("expected Unreachable to be a no-op")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 17 15:22:22 UTC 2017 - 842 bytes - Viewed (0) -
test/fixedbugs/issue29612.dir/main.go
// Do not panic on conversion to anonymous interface, which // is similar-looking interface types in different packages. package main import ( "fmt" ssa1 "issue29612.dir/p1/ssa" ssa2 "issue29612.dir/p2/ssa" ) func main() { v1 := &ssa1.T{} _ = v1 v2 := &ssa2.T{} ssa2.Works(v2) ssa2.Panics(v2) // This call must not panic swt(v1, 1) swt(v2, 2) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 25 14:19:25 UTC 2020 - 845 bytes - Viewed (0) -
src/vendor/golang.org/x/crypto/cryptobyte/builder.go
// that outlive the continuation. // // If the continuation panics with a value of type BuildError then the inner // error will be returned as the error from Bytes. If the child panics // otherwise then Bytes will repanic with the same value. type BuilderContinuation func(child *Builder) // BuildError wraps an error. If a BuilderContinuation panics with this value, // the panic will be recovered and the inner error will be returned from
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 10 16:32:44 UTC 2023 - 9.9K bytes - Viewed (0) -
pkg/config/schema/codegen/templates/gvk.go.tmpl
{{- end }} } return schema.GroupVersionResource{}, false } // MustToGVR converts a GVK to a GVR, and panics if it cannot be converted // Warning: this is only safe for known types; do not call on arbitrary GVKs func MustToGVR(g config.GroupVersionKind) schema.GroupVersionResource { r, ok := ToGVR(g) if !ok { panic("unknown kind: " + g.String()) } return r } // FromGVR converts a GVR to a GVK.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Dec 04 03:54:51 UTC 2023 - 2K bytes - Viewed (0)