- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 742 for recovered (0.62 sec)
-
test/recover1.go
v := recover() if v == nil { println("missing recover") die() // panic is useless here } if v != x { println("wrong value", v, x) die() } // the value should be gone now regardless v = recover() if v != nil { println("recover didn't recover") die() } } func mustNotRecover() { v := recover() if v != nil { println("spurious recover")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 2.5K bytes - Viewed (0) -
test/recover5.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Verify that recover arguments requirements are enforced by the // compiler. package main func main() { _ = recover() // OK _ = recover(1) // ERROR "too many arguments" _ = recover(1, 2) // ERROR "too many arguments"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 24 12:37:49 UTC 2017 - 408 bytes - Viewed (0) -
test/recover2.go
// license that can be found in the LICENSE file. // Test of recover for run-time errors. // TODO(rsc): // null pointer accesses package main import "strings" var x = make([]byte, 10) func main() { test1() test2() test3() test4() test5() test6() test7() } func mustRecover(s string) { v := recover() if v == nil { panic("expected panic") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 03 20:41:29 UTC 2019 - 1.2K bytes - Viewed (0) -
test/recover3.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 1.6K bytes - Viewed (0) -
test/recover4.go
) func memcopy(dst, src []byte) (n int, err error) { defer func() { if r, ok := recover().(error); ok { err = r } }() for i := 0; i < len(dst) && i < len(src); i++ { dst[i] = src[i] n++ } return } func main() { // Turn the eventual fault into a panic, not a program crash, // so that memcopy can recover. debug.SetPanicOnFault(true) size := syscall.Getpagesize()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 2.2K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/genericOps.go
{name: "Plain"}, // a single successor {name: "If", controls: 1}, // if Controls[0] goto Succs[0] else goto Succs[1] {name: "Defer", controls: 1}, // Succs[0]=defer queued, Succs[1]=defer recovered. Controls[0] is call op (of memory type) {name: "Ret", controls: 1}, // no successors, Controls[0] value is memory result {name: "RetJmp", controls: 1}, // no successors, Controls[0] value is a tail call
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 15:49:20 UTC 2024 - 42.6K bytes - Viewed (0) -
pkg/apis/admissionregistration/types.go
// The AdmissionPolicy cares about a request if it matches _all_ Constraint. // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API // ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. // Required. MatchConstraints *MatchResources
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Feb 29 20:14:19 UTC 2024 - 52.6K bytes - Viewed (0) -
src/html/template/exec_test.go
continue } if buf.String() != tt.out { t.Errorf("%s: template output = %q, want %q", tt.text, &buf, tt.out) } } } // Check that panics during calls are recovered and returned as errors. func TestExecutePanicDuringCall(t *testing.T) { funcs := map[string]any{ "doPanic": func() string { panic("custom panic string") }, } tests := []struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 24 21:59:12 UTC 2024 - 57.6K bytes - Viewed (0) -
src/text/template/exec_test.go
continue } if buf.String() != tt.out { t.Errorf("%s: template output = %q, want %q", tt.text, &buf, tt.out) } } } // Check that panics during calls are recovered and returned as errors. func TestExecutePanicDuringCall(t *testing.T) { funcs := map[string]any{ "doPanic": func() string { panic("custom panic string") }, } tests := []struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 22:23:55 UTC 2024 - 60.1K bytes - Viewed (0) -
test/recover.go
} func mustRecover(x interface{}) { mustRecoverBody(doubleRecover(), recover(), recover(), x) } func mustNotRecover() { v := recover() if v != nil { println("spurious recover", v) die() } } func withoutRecover() { mustNotRecover() // because it's a sub-call } func withoutRecoverRecursive(n int) { if n == 0 { withoutRecoverRecursive(1) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 10.6K bytes - Viewed (0)