mirror of https://github.com/Hilbis/Hilbish
fix(hilbish.goro): attempt to recover panic
parent
c1b78a8ea7
commit
7932fa677f
6
api.go
6
api.go
|
@ -494,6 +494,12 @@ func hlgoro(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
|
|||
|
||||
// call fn
|
||||
go func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
// do something here?
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := rt.Call1(l.MainThread(), rt.FunctionValue(fn), c.Etc()...)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, "Error in goro function:\n\n", err)
|
||||
|
|
Loading…
Reference in New Issue