fix: print error in interval func instead of panic

pull/61/head
sammyette 2021-06-11 23:54:18 -04:00
parent a4dbfbf4bb
commit f594d48790
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5
1 changed files with 2 additions and 1 deletions

3
lua.go
View File

@ -170,7 +170,8 @@ func hshinterval(L *lua.LState) int {
NRet: 0, NRet: 0,
Protect: true, Protect: true,
}); err != nil { }); err != nil {
panic(err) fmt.Fprintln(os.Stderr,
"Error in interval function:\n\n", err)
} }
case <-stop: case <-stop:
ticker.Stop() ticker.Stop()