- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 628 for recovery (0.15 sec)
-
test/fixedbugs/issue19799.go
// license that can be found in the LICENSE file. package main import ( "os" "runtime" ) func foo(x int) int { return x + 1 } func test() { defer func() { if r := recover(); r != nil { pcs := make([]uintptr, 10) n := runtime.Callers(0, pcs) pcs = pcs[:n] frames := runtime.CallersFrames(pcs) for { f, more := frames.Next() if f.Function == "main.foo" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 02 13:41:01 UTC 2017 - 1.1K bytes - Viewed (0) -
src/runtime/runtime_test.go
defer func(x, y, z int) { if recover() != nil || x != 1 || y != 2 || z != 3 { panic("bad recover") } }(1, 2, 3) } } func BenchmarkPanicRecover(b *testing.B) { for i := 0; i < b.N; i++ { defer3() } } func defer3() { defer func(x, y, z int) { if recover() == nil { panic("failed recover") } }(1, 2, 3) panic("hi") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 11.7K bytes - Viewed (0) -
subprojects/core/src/integTest/groovy/org/gradle/api/HttpScriptPluginIntegrationSpec.groovy
when: server.stop() args("--offline") then: succeeds 'help' output.contains('loaded external script 2') } def "reports and recovers from missing remote script"() { String scriptName = "script-missing.gradle" String scriptUrl = "${server.uri}/${scriptName}" def scriptFile = file("script.gradle") << """
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Aug 30 08:26:30 UTC 2023 - 11.7K bytes - Viewed (0) -
src/iter/pull_test.go
func doDoubleNext2() Seq2[int, int] { return func(_ func(int, int) bool) { defer func() { if recover() != nil { nextSlot2 = nil } }() nextSlot2() } } func TestPullDoubleYield(t *testing.T) { _, stop := Pull(storeYield()) defer func() { if recover() != nil { yieldSlot = nil } stop() }() yieldSlot(5) if yieldSlot != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 19:09:28 UTC 2024 - 10.2K bytes - Viewed (0) -
src/encoding/gob/error.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package gob import "fmt" // Errors in decoding and encoding are handled using panic and recover. // Panics caused by user error (that is, everything except run-time panics // such as "index out of bounds" errors) do not leave the file that caused // them, but are instead turned into plain error returns. Encoding and
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 30 23:03:07 UTC 2022 - 1.3K bytes - Viewed (0) -
src/testing/run_example_wasm.go
// os.Pipe because it is not supported on js/wasm. stdout := os.Stdout f := createTempFile(eg.Name) os.Stdout = f finished := false start := time.Now() // Clean up in a deferred call so we can recover if the example panics. defer func() { timeSpent := time.Since(start) // Restore stdout, get output and remove temporary file. os.Stdout = stdout var buf strings.Builder
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 11 20:56:32 UTC 2023 - 1.8K bytes - Viewed (0) -
src/cmd/compile/internal/test/testdata/string_test.go
} func testInt64IndexPanic(t *testing.T) { defer func() { if r := recover(); r != nil { //println("panicked as expected") } }() str := "foobar" t.Errorf("got %d and expected to panic, but didn't", testInt64Index_ssa(str, 1<<32+1)) } func testInt64SlicePanic(t *testing.T) { defer func() { if r := recover(); r != nil { //println("panicked as expected") } }()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 23 06:40:04 UTC 2020 - 4.5K bytes - Viewed (0) -
src/runtime/cgo/handle_test.go
t.Run("zero", func(t *testing.T) { h := Handle(0) defer func() { if r := recover(); r != nil { return } t.Fatalf("Delete of zero handle did not trigger a panic") }() h.Delete() }) t.Run("invalid", func(t *testing.T) { h := NewHandle(42) defer func() { if r := recover(); r != nil { h.Delete() return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 1.8K bytes - Viewed (0) -
platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/suppliers/DynamicRevisionRemoteResolveWithMetadataSupplierIntegrationTest.groovy
'group:projectA' { expectVersionListing() '1.2' { expectResolve() } } } then: "recovers from previous --offline mode" checkResolve "group:projectA:1.+": ["group:projectA:1.2", "didn't match version 2.0"], "group:projectB:latest.release": ["group:projectB:1.1", "didn't match version 2.2"] }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Apr 01 11:46:17 UTC 2024 - 49K bytes - Viewed (0) -
test/fixedbugs/issue51839.go
// license that can be found in the LICENSE file. package main func main() { testRecover() } func testRecover() { if false { func() { defer func() { _ = recover() }() }() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 21 17:27:41 UTC 2022 - 317 bytes - Viewed (0)