Last active
May 18, 2016 06:03
-
-
Save legendtkl/09caa1f6e63320a0a5a26b5ed4e9bcc9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//error handle | |
//when exit, print stack out | |
func foo() { | |
if err := recover(); err != nil { | |
debug.PrintStack() | |
log.Error("Error: ", err) | |
}() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment