mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 05:37:55 +08:00
16 lines
292 B
Go
16 lines
292 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/g"
|
|
"github.com/gogf/gf/g/os/glog"
|
|
)
|
|
|
|
func main() {
|
|
g.TryCatch(func() {
|
|
glog.Printfln("hello")
|
|
g.Throw("exception")
|
|
glog.Printfln("world")
|
|
}, func(exception interface{}) {
|
|
glog.Error(exception)
|
|
})
|
|
} |