Created
August 20, 2017 07:47
-
-
Save Natata/5526b523ce0eb44129721470084fd979 to your computer and use it in GitHub Desktop.
This file contains 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
func recoverFactory(f func()) func() { | |
rf := func() { | |
defer func() { | |
if r := recover(); r != nil { | |
fmt.Println("Recovered in f", r, "ker") | |
} | |
}() | |
f() | |
} | |
return rf | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment