From 7932fa677f0ecc93d0d4d21ced019b180617df79 Mon Sep 17 00:00:00 2001 From: sammyette Date: Tue, 26 Dec 2023 12:32:32 -0400 Subject: [PATCH] fix(hilbish.goro): attempt to recover panic --- api.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api.go b/api.go index b5a55b1..5f69eed 100644 --- a/api.go +++ b/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)