Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 742 for recovered (0.22 sec)

  1. src/cmd/go/testdata/script/test_cleanup_failnow.txt

    ! stdout 'no tests to run'
    stdout '(?s)panic: die \[recovered\].*panic: die'
    ! stdout '(?s)panic: die \[recovered\].*panic: die.*panic: die'
    
    ! go test -v cleanup_failnow/panic_withcleanup_test.go
    ! stdout 'no tests to run'
    stdout '(?s)panic: die \[recovered\].*panic: die'
    ! stdout '(?s)panic: die \[recovered\].*panic: die.*panic: die'
    
    -- cleanup_failnow/panic_nocleanup_test.go --
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 16 14:49:13 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  2. src/testing/example.go

    // stdout is the captured output from stdout of the test.
    // recovered is the result of invoking recover after running the test, in case it panicked.
    //
    // If stdout doesn't match the expected output or if recovered is non-nil, it'll print the cause of failure to stdout.
    // If the test is chatty/verbose, it'll print a success message to stdout.
    // If recovered is non-nil, it'll panic with that value.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  3. src/runtime/testdata/testprog/deadlock.go

    func RecursivePanic3() {
    	defer func() {
    		defer func() {
    			recover()
    		}()
    		panic("second panic")
    	}()
    	panic("first panic")
    }
    
    // Test case where a single defer recovers one panic but starts another panic. If
    // the second panic is never recovered, then the recovered first panic will still
    // appear on the panic stack (labeled '[recovered]') and the runtime stack.
    func RecursivePanic4() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 27 20:44:24 UTC 2021
    - 6.5K bytes
    - Viewed (0)
  4. src/cmd/go/testdata/script/test_fuzz_return.txt

    [short] skip
    
    ! go test .
    stdout '^panic: testing: fuzz target must not return a value \[recovered\]$'
    
    -- go.mod --
    module test
    go 1.18
    -- x_test.go --
    package test
    
    import "testing"
    
    func FuzzReturnErr(f *testing.F) {
    	f.Add("hello, validation!")
    	f.Fuzz(func(t *testing.T, in string) string {
    		return in
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 16 16:06:39 UTC 2022
    - 314 bytes
    - Viewed (0)
  5. src/runtime/signal_plan9.go

    var sigtable = [...]sigTabT{
    	// Traps that we cannot be recovered.
    	{_SigThrow, "sys: trap: debug exception"},
    	{_SigThrow, "sys: trap: invalid opcode"},
    
    	// We can recover from some memory errors in runtime·sigpanic.
    	{_SigPanic, "sys: trap: fault read"},  // SIGRFAULT
    	{_SigPanic, "sys: trap: fault write"}, // SIGWFAULT
    
    	// We can also recover from math errors.
    	{_SigPanic, "sys: trap: divide error"}, // SIGINTDIV
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 07 16:25:17 UTC 2016
    - 1.9K bytes
    - Viewed (0)
  6. src/cmd/internal/test2json/testdata/panic.test

    --- FAIL: TestPanic (0.00s)
    panic: oops [recovered]
    	panic: oops
    
    goroutine 7 [running]:
    testing.tRunner.func1(0xc000092100)
    	/go/src/testing/testing.go:874 +0x3a3
    panic(0x1110ea0, 0x116aea0)
    	/go/src/runtime/panic.go:679 +0x1b2
    command-line-arguments.TestPanic(0xc000092100)
    	a_test.go:6 +0x39
    testing.tRunner(0xc000092100, 0x114f500)
    	go/src/testing/testing.go:909 +0xc9
    created by testing.(*T).Run
    	go/src/testing/testing.go:960 +0x350
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 30 20:46:44 UTC 2019
    - 479 bytes
    - Viewed (0)
  7. src/runtime/testdata/testprog/abort.go

    package main
    
    import _ "unsafe" // for go:linkname
    
    func init() {
    	register("Abort", Abort)
    }
    
    //go:linkname runtimeAbort runtime.abort
    func runtimeAbort()
    
    func Abort() {
    	defer func() {
    		recover()
    		panic("BAD: recovered from abort")
    	}()
    	runtimeAbort()
    	println("BAD: after abort")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 08 22:55:55 UTC 2018
    - 449 bytes
    - Viewed (0)
  8. src/runtime/testdata/testprogcgo/sigfwd.go

    		fmt.Fprintf(os.Stderr, "test must be run with GO_TEST_CGOSIGFWD set\n")
    		os.Exit(1)
    	}
    
    	// Test that the signal originating in Go is handled (and recovered) by Go.
    	if !f() {
    		fmt.Fprintf(os.Stderr, "couldn't recover from SIGSEGV in Go.\n")
    		C.exit(2)
    	}
    
    	// Test that the signal originating in C is handled by C.
    	C.sigsegv()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 01 17:06:49 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  9. src/runtime/testdata/testprogcgo/crash.go

    package main
    
    import (
    	"fmt"
    	"runtime"
    )
    
    func init() {
    	register("Crash", Crash)
    }
    
    func test(name string) {
    	defer func() {
    		if x := recover(); x != nil {
    			fmt.Printf(" recovered")
    		}
    		fmt.Printf(" done\n")
    	}()
    	fmt.Printf("%s:", name)
    	var s *string
    	_ = *s
    	fmt.Print("SHOULD NOT BE HERE")
    }
    
    func testInNewThread(name string) {
    	c := make(chan bool)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 23:34:33 UTC 2016
    - 743 bytes
    - Viewed (0)
  10. src/cmd/internal/test2json/testdata/panic.json

    {"Action":"start"}
    {"Action":"output","Test":"TestPanic","Output":"--- FAIL: TestPanic (0.00s)\n"}
    {"Action":"output","Test":"TestPanic","Output":"panic: oops [recovered]\n"}
    {"Action":"output","Test":"TestPanic","Output":"\tpanic: oops\n"}
    {"Action":"output","Test":"TestPanic","Output":"\n"}
    {"Action":"output","Test":"TestPanic","Output":"goroutine 7 [running]:\n"}
    {"Action":"output","Test":"TestPanic","Output":"testing.tRunner.func1(0xc000092100)\n"}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 09 17:33:07 UTC 2022
    - 1.4K bytes
    - Viewed (0)
Back to top