package main
import "fmt"
func fn_test_panic() (a int) {
a = 2
panic("This is panic")
return a
}
func fn1() (a int) {
a = 3
defer func(){
if p := recover(); p != nil {
fmt.Println("recover")
}
}()
fmt.Println("befor call panic")
b := fn_test_panic()
fmt.Println("after call panic")
a = b
return a
}
func main() {
fmt.Println("return code:", fn1())
}