Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for mustNotRecover (0.16 sec)

  1. test/recover1.go

    	v = recover()
    	if v != nil {
    		println("recover didn't recover")
    		die()
    	}
    }
    
    func mustNotRecover() {
    	v := recover()
    	if v != nil {
    		println("spurious recover")
    		die()
    	}
    }
    
    func withoutRecover() {
    	mustNotRecover()	// because it's a sub-call
    }
    
    func test1() {
    	// Easy nested recursive panic.
    	defer mustRecover(1)
    	defer func() {
    		defer mustRecover(2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 2.5K bytes
    - Viewed (0)
  2. test/recover.go

    	return recover()
    }
    
    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)
Back to top