Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 3,023 for panics (0.17 sec)

  1. 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)
  2. cmd/net.go

    	return ipList
    }
    
    // mustGetLocalIP4 returns IPv4 addresses of localhost.  It panics on error.
    func mustGetLocalIP4() (ipList set.StringSet) {
    	ipList = set.NewStringSet()
    	for _, ip := range mustGetLocalIPs() {
    		if ip.To4() != nil {
    			ipList.Add(ip.String())
    		}
    	}
    	return
    }
    
    // mustGetLocalIP6 returns IPv6 addresses of localhost.  It panics on error.
    func mustGetLocalIP6() (ipList set.StringSet) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. src/slices/slices_test.go

    		{"with out-of-bounds index and = cap", a[:1:2], 2, b[:]},
    		{"with out-of-bounds index and < cap", a[:1:3], 2, b[:]},
    	} {
    		if !panics(func() { _ = Insert(test.s, test.i, test.v...) }) {
    			t.Errorf("Insert %s: got no panic, want panic", test.name)
    		}
    	}
    }
    
    var deleteTests = []struct {
    	s    []int
    	i, j int
    	want []int
    }{
    	{
    		[]int{1, 2, 3},
    		0,
    		0,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  7. cmd/kubeadm/test/cmd/init_test.go

    					rt.name,
    					err,
    					rt.args,
    					rt.expected,
    					(err == nil),
    				)
    			}
    		})
    	}
    }
    
    // TestCmdInitFeatureGates test that feature gates won't make kubeadm panic.
    // When go panics it will exit with a 2 code. While we don't expect the init
    // calls to succeed in these tests, we ensure that the exit code of calling
    // kubeadm with different feature gates is not 2.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 18 01:03:09 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/version/version.go

    func ParseGeneric(str string) (*Version, error) {
    	return parse(str, false)
    }
    
    // MustParseGeneric is like ParseGeneric except that it panics on error
    func MustParseGeneric(str string) *Version {
    	v, err := ParseGeneric(str)
    	if err != nil {
    		panic(err)
    	}
    	return v
    }
    
    // ParseSemantic parses a version string that exactly obeys the syntax and semantics of
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 18 19:25:29 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  9. src/cmd/go/internal/script/scripttest/scripttest.go

    	t.Helper()
    	err := func() (err error) {
    		log := new(strings.Builder)
    		log.WriteString("\n") // Start output on a new line for consistent indentation.
    
    		// Defer writing to the test log in case the script engine panics during execution,
    		// but write the log before we write the final "skip" or "FAIL" line.
    		t.Helper()
    		defer func() {
    			t.Helper()
    
    			if closeErr := s.CloseAndWait(log); err == nil {
    				err = closeErr
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 11 20:12:18 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  10. src/testing/sub_test.go

    			t.Log("message2")
    			ch <- true
    			<-ch
    			t.Errorf("error")
    		},
    	}, {
    		// If a subtest panics we should run cleanups.
    		desc:   "cleanup when subtest panics",
    		ok:     false,
    		chatty: false,
    		output: `
    --- FAIL: cleanup when subtest panics (N.NNs)
        --- FAIL: cleanup when subtest panics/sub (N.NNs)
        sub_test.go:NNN: running cleanup`,
    		f: func(t *T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 01 21:27:08 UTC 2023
    - 23.8K bytes
    - Viewed (0)
Back to top