Skip to content

Instantly share code, notes, and snippets.

@kaneshin
Created August 12, 2015 01:20
Show Gist options
  • Save kaneshin/906d92de1350fe1782c8 to your computer and use it in GitHub Desktop.
Save kaneshin/906d92de1350fe1782c8 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"github.com/kaneshin/gopack/exception"
)
// main ...
func main() {
exception.Try(func() {
fmt.Println("Try")
panic("hello")
}).Catch(func(e exception.Exception) {
fmt.Println("Catch", e.Message())
}).Finally(func() {
fmt.Println("Finally")
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment