From b551949a2bdbddc1cd692eba8f750721902e8cba Mon Sep 17 00:00:00 2001 From: colstuwjx Date: Wed, 31 Jul 2019 14:08:58 +0800 Subject: [PATCH] Add PrintStack() while orm abnormally exit. --- orm/models_boot.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/orm/models_boot.go b/orm/models_boot.go index 456e5896..8c56b3c4 100644 --- a/orm/models_boot.go +++ b/orm/models_boot.go @@ -18,6 +18,7 @@ import ( "fmt" "os" "reflect" + "runtime/debug" "strings" ) @@ -298,6 +299,7 @@ func bootStrap() { end: if err != nil { fmt.Println(err) + debug.PrintStack() os.Exit(2) } }