feat: print tracebacks for errors

lua-history^2
TorchedSammy 2022-07-13 10:08:23 -04:00
parent b65acca903
commit 2b480e50e6
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 4 additions and 0 deletions

4
lua.go
View File

@ -12,12 +12,16 @@ import (
rt "github.com/arnodel/golua/runtime"
"github.com/arnodel/golua/lib"
"github.com/arnodel/golua/lib/debuglib"
)
var minimalconf = `hilbish.prompt '& '`
func luaInit() {
l = rt.New(os.Stdout)
l.PushContext(rt.RuntimeContextDef{
MessageHandler: debuglib.Traceback,
})
lib.LoadAll(l)
lib.LoadLibs(l, hilbishLoader)