diff options
| author | unwox <me@unwox.com> | 2025-10-13 22:25:27 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2025-10-13 22:25:27 +0600 |
| commit | 06d94fe7f16e8985878a24332978731439599c4e (patch) | |
| tree | bfecb440546167aa34575a1bed94c24f1bf59231 /lua.go | |
| parent | aadee458066c5d623ae2a16b8957f51418139fcd (diff) | |
fix error handling
Diffstat (limited to 'lua.go')
| -rw-r--r-- | lua.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -293,12 +293,14 @@ func (l *Lua) GetGlobal(name string) { } func (l *Lua) NewThread(yield func(), resume func() bool) *Lua { - return &Lua{ + newl := &Lua{ l: C.lua_newthread(l.l), running: l.running, resume: resume, yield: yield, } + newl.PushGoFunction(TracebackHandler) + return newl } // TracebackHandler handles stack trace formatting on errors. |
