Skip to content

Commit

Permalink
fix(hilbish.goro): attempt to recover panic
Browse files Browse the repository at this point in the history
  • Loading branch information
TorchedSammy committed Dec 26, 2023
1 parent c1b78a8 commit 7932fa6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7932fa6

Please sign in to comment.