github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/panic0b.gno (about)

     1  package main
     2  
     3  func main() {
     4  	f()
     5  }
     6  
     7  func f() {
     8  	defer func() {
     9  		panic("third")
    10  	}()
    11  	defer func() {
    12  		panic("second")
    13  	}()
    14  	panic("first")
    15  }
    16  
    17  // Error:
    18  // first
    19  // 	second
    20  // 	third