- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 160 for panic (0.03 sec)
-
src/cmd/cgo/ast_go118.go
"go/token" ) func (f *File) walkUnexpected(x interface{}, context astContext, visit func(*File, interface{}, astContext)) { switch n := x.(type) { default: error_(token.NoPos, "unexpected type %T in walk", x) panic("unexpected type") case *ast.IndexListExpr: f.walk(&n.X, ctxExpr, visit) f.walk(n.Indices, ctxExpr, visit) } } func funcTypeTypeParams(n *ast.FuncType) *ast.FieldList { return n.TypeParams }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Nov 30 21:45:10 UTC 2022 - 730 bytes - Viewed (0) -
src/bufio/scan_test.go
func TestDontLoopForever(t *testing.T) { s := NewScanner(strings.NewReader("abc")) s.Split(loopAtEOFSplit) // Expect a panic defer func() { err := recover() if err == nil { t.Fatal("should have panicked") } if msg, ok := err.(string); !ok || !strings.Contains(msg, "empty tokens") { panic(err) } }() for count := 0; s.Scan(); count++ { if count > 1000 { t.Fatal("looping") } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 14.3K bytes - Viewed (0) -
tests/transaction_test.go
if err := tx.First(&User{}, "name = ?", user.Name).Error; err != nil { t.Fatalf("Should find saved record") } panic("force panic") }) }) if err := DB.First(&User{}, "name = ?", "transaction-block-3").Error; err == nil { t.Fatalf("Should not find record after panic rollback") } } func TestTransactionRaiseErrorOnRollbackAfterCommit(t *testing.T) { tx := DB.Begin()
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 12.9K bytes - Viewed (0) -
docs/hotfixes.md
``` commit 4f3317effea38c203c358af9cb5ce3c0e4173976 Author: Klaus Post <******@****.***> Date: Mon Nov 8 08:41:27 2021 -0800 Close stream on panic (#13605) Always close streamHTTPResponse on panic on main thread to avoid write/flush after response handler has returned. ``` ``` λ git cherry-pick 4f3317effea38c203c358af9cb5ce3c0e4173976 ```
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Feb 14 21:36:02 UTC 2024 - 5K bytes - Viewed (0) -
cni/pkg/nodeagent/fakes_test.go
func (f *fakeNs) Close() error { f.closed.Store(true) return nil } func fakeFs() fs.FS { subFs, err := fs.Sub(fakeProc, "testdata") if err != nil { panic(err) } subFs, err = fs.Sub(subFs, "cgroupns") if err != nil { panic(err) } return &fakeFsWithFakeFds{ReadDirFS: subFs.(fs.ReadDirFS)} } type fakeFsWithFakeFds struct { fs.ReadDirFS } type fakeFileFakeFds struct { fs.File
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Jun 28 23:33:46 UTC 2024 - 3.9K bytes - Viewed (0) -
src/bufio/bufio_test.go
func TestNegativeRead(t *testing.T) { // should panic with a description pointing at the reader, not at itself. // (should NOT panic with slice index error, for example.) b := NewReader(new(negativeReader)) defer func() { switch err := recover().(type) { case nil: t.Fatal("read did not panic") case error:
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
internal/lsync/lrwmutex.go
success := lm.unlock(isWriteLock) if !success { panic("Trying to Unlock() while no Lock() is active") } } // RUnlock releases a read lock held on lm. // // It is a run-time error if lm is not locked on entry to RUnlock. func (lm *LRWMutex) RUnlock() { isWriteLock := false success := lm.unlock(isWriteLock) if !success { panic("Trying to RUnlock() while no RLock() is active") } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 4.8K bytes - Viewed (0) -
cmd/dummy-data-generator_test.go
// // f(NewDummyDataGen(100, 0)) == f(NewDummyDataGen(50, 0)) + f(NewDummyDataGen(50, 50)) func NewDummyDataGen(totalLength, skipOffset int64) io.ReadSeeker { if totalLength < 0 { panic("Negative length passed to DummyDataGen!") } if skipOffset < 0 { panic("Negative rotations are not allowed") } skipOffset %= int64(len(alphabets)) const multiply = 100 as := bytes.Repeat(alphabets, multiply)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 02 15:13:05 UTC 2024 - 4.7K bytes - Viewed (0) -
src/cmd/api/main_test.go
} func (w *Walker) emitf(format string, args ...any) { f := strings.Join(w.scope, ", ") + ", " + fmt.Sprintf(format, args...) if strings.Contains(f, "\n") { panic("feature contains newlines: " + f) } if _, dup := w.features[f]; dup { panic("duplicate feature inserted: " + f) } w.features[f] = true if verbose { log.Printf("feature: %s", f) } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Sep 04 18:16:59 UTC 2024 - 31.4K bytes - Viewed (0) -
cni/pkg/nodeagent/podcgroupns_test.go
Name: "foo", Namespace: "bar", UID: types.UID("863b91d4-4b68-4efa-917f-4b560e3e86aa"), }} podUIDNetns, err := n.FindNetnsForPods(map[types.UID]*corev1.Pod{ pod.UID: pod, }) if err != nil { panic(err) } defer podUIDNetns.Close() if len(podUIDNetns) == 0 { t.Fatal("expected to find pod netns") } expectedUID := "863b91d4-4b68-4efa-917f-4b560e3e86aa"
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Oct 24 17:36:49 UTC 2024 - 4.6K bytes - Viewed (0)