mirror of
https://gitee.com/johng/gf.git
synced 2024-12-04 05:07:44 +08:00
23 lines
353 B
Go
23 lines
353 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/frame/g"
|
|
"github.com/gogf/gf/os/glog"
|
|
)
|
|
|
|
func main() {
|
|
g.TryCatch(func() {
|
|
glog.Println("hello")
|
|
g.Throw("exception")
|
|
glog.Println("world")
|
|
})
|
|
|
|
g.TryCatch(func() {
|
|
glog.Println("hello")
|
|
g.Throw("exception")
|
|
glog.Println("world")
|
|
}, func(exception interface{}) {
|
|
glog.Error(exception)
|
|
})
|
|
}
|