Исходники и презентации
This commit is contained in:
14
lessons/errors/panic_with_defer_2/main.go
Normal file
14
lessons/errors/panic_with_defer_2/main.go
Normal file
@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func process() {
|
||||
fmt.Println("V2: open file")
|
||||
defer fmt.Println("V2: close file")
|
||||
|
||||
panic("error")
|
||||
}
|
||||
|
||||
func main() {
|
||||
process()
|
||||
}
|
||||
Reference in New Issue
Block a user