Skip to content

Instantly share code, notes, and snippets.

@ben-ng
Created March 7, 2014 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ben-ng/9403980 to your computer and use it in GitHub Desktop.
Save ben-ng/9403980 to your computer and use it in GitHub Desktop.
func main() {
runloop := func() {
// Recovers from panics
defer func() {
if r := recover(); r != nil {
runloop() // why doesn't this compile?? "undefined: runloop"
}
}()
panic()
}
runloop()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment