golangã§ã¯ããããpanicããªãããã«ã³ã¼ããæ¸ãã¹ãã ãpanicãçºçãããªãããã§çºçããã®ã ã¨ææ¡ããä¸ã§ã³ã¼ããæ¸ãã¹ãã ãã¨ããèªèã¯ãããã¨ã¯ãããgolangæ¸ãå§ãã¦ã¾ããªãã®ã§ã念ã®ããã«ãrecoverãã³ã¼ãã«æ¸ãã¦ããããã£ãã å ·ä½çãªã³ã¼ãã¯ä»¥ä¸ã®éãã https://play.golang.org/p/CxiR4j5Q6F_a package main import ( "fmt" "log" "runtime" ) func main() { log.SetFlags(log.LstdFlags | log.Lshortfile) defer func() { if err := recover(); err != nil { log.Printf("[ERROR] %s\n", err) for depth := 0; ; depth++ {
{{#tags}}- {{label}}
{{/tags}}