1
0
forked from redo/BlockLua

Update lua-env.lua

This commit is contained in:
2025-12-08 03:32:31 -05:00
parent 33f5ec9bbe
commit a7db0d8e81

View File

@@ -18,6 +18,8 @@ end
-- Called when pcall fails on a ts->lua call, used to print detailed error info
function _bllua_on_error(err)
-- Convert error to string if it's not already
err = tostring(err)
err = err:match(': (.+)$') or err
local tracelines = { err }
local level = 2
@@ -25,7 +27,7 @@ function _bllua_on_error(err)
local info = debug.getinfo(level)
if not info then break end
local filename = debug.getfilename(level) or info.short_src
local funcname = info.name
local funcname = info.name or '<unknown>'
if funcname == 'dofile' then break end
table.insert(tracelines, string.format('%s:%s in function \'%s\'',
filename,