- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 3,023 for panics (0.21 sec)
-
src/internal/trace/resources.go
// // r.Kind must be ResourceGoroutine or this function will panic. func (r ResourceID) Goroutine() GoID { if r.Kind != ResourceGoroutine { panic(fmt.Sprintf("attempted to get GoID from %s resource ID", r.Kind)) } return GoID(r.id) } // Proc obtains a ProcID from the resource ID. // // r.Kind must be ResourceProc or this function will panic. func (r ResourceID) Proc() ProcID { if r.Kind != ResourceProc {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 8K bytes - Viewed (0) -
pkg/test/util/tmpl/evaluate.go
} return s } // MustEvaluate calls Evaluate and panics if there is an error. func MustEvaluate(tpl string, data any) string { s, err := Evaluate(tpl, data) if err != nil { panic(fmt.Sprintf("tmpl.MustEvaluate: %v", err)) } return s } func MustEvaluateFile(filePath string, data any) string { s, err := EvaluateFile(filePath, data) if err != nil { panic(fmt.Sprintf("tmpl.MustEvaluate: %v", err)) } return s
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 25 19:30:47 UTC 2022 - 3.1K bytes - Viewed (0) -
test/fixedbugs/issue4085b.go
} } func shouldPanic(str string, f func()) { defer func() { err := recover() if err == nil { panic("did not panic") } s := err.(error).Error() if !strings.Contains(s, str) { panic("got panic " + s + ", want " + str) } }() f() } // Test make in append panics since the gc compiler optimizes makes in appends. func testMakeInAppend(n int) { lengths := []int{0, 1}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 17 17:18:17 UTC 2019 - 2.9K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go
return &ApiextensionsV1beta1Client{client}, nil } // NewForConfigOrDie creates a new ApiextensionsV1beta1Client for the given config and // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *ApiextensionsV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) } return client } // New creates a new ApiextensionsV1beta1Client for the given RESTClient.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 20 04:39:39 UTC 2021 - 3.2K bytes - Viewed (0) -
src/net/http/httptest/httptest.go
// // The provided body may be nil. If the body is of type *bytes.Reader, // *strings.Reader, or *bytes.Buffer, the Request.ContentLength is // set. // // NewRequest panics on error for ease of use in testing, where a // panic is acceptable. // // To generate a client HTTP request instead of a server request, see // the NewRequest function in the net/http package.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 18:09:14 UTC 2024 - 2.6K bytes - Viewed (0) -
src/runtime/panic.go
// This is used to try hard to get a panic stack trace out when exiting. var runningPanicDefers atomic.Uint32 // panicking is non-zero when crashing the program for an unrecovered panic. var panicking atomic.Uint32 // paniclk is held while printing the panic information and stack trace, // so that two concurrent panics don't overlap their output. var paniclk mutex
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 43.8K bytes - Viewed (0) -
src/math/big/rat.go
f, exact = quotToFloat64(x.a.abs, b) if x.a.neg { f = -f } return } // SetFrac sets z to a/b and returns z. // If b == 0, SetFrac panics. func (z *Rat) SetFrac(a, b *Int) *Rat { z.a.neg = a.neg != b.neg babs := b.abs if len(babs) == 0 { panic("division by zero") } if &z.a == b || alias(z.a.abs, babs) { babs = nat(nil).set(babs) // make a copy } z.a.abs = z.a.abs.set(a.abs)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 13.5K bytes - Viewed (0) -
src/math/big/sqrt.go
// result of z.Acc() is undefined. // // The function panics if z < 0. The value of z is undefined in that // case. func (z *Float) Sqrt(x *Float) *Float { if debugFloat { x.validate() } if z.prec == 0 { z.prec = x.prec } if x.Sign() == -1 { // following IEEE754-2008 (section 7.2) panic(ErrNaN{"square root of negative operand"}) } // handle ±0 and +∞
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 2.8K bytes - Viewed (0) -
src/cmd/compile/internal/ir/mini.go
func (n *miniNode) Type() *types.Type { return nil } func (n *miniNode) SetType(*types.Type) { panic(n.no("SetType")) } func (n *miniNode) Name() *Name { return nil } func (n *miniNode) Sym() *types.Sym { return nil } func (n *miniNode) Val() constant.Value { panic(n.no("Val")) } func (n *miniNode) SetVal(v constant.Value) { panic(n.no("SetVal")) } func (n *miniNode) NonNil() bool { return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 31 22:09:44 UTC 2022 - 2.8K bytes - Viewed (0) -
src/crypto/rand/util.go
p.SetBytes(bytes) if p.ProbablyPrime(20) { return p, nil } } } // Int returns a uniform random value in [0, max). It panics if max <= 0. func Int(rand io.Reader, max *big.Int) (n *big.Int, err error) { if max.Sign() <= 0 { panic("crypto/rand: argument to Int is <= 0") } n = new(big.Int) n.Sub(max, n.SetUint64(1)) // bitLen is the maximum bit length needed to encode a value < max.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 2.4K bytes - Viewed (0)