Improved error messages

This commit is contained in:
kepler155c@gmail.com
2020-05-12 21:25:37 -06:00
parent 2629f2a172
commit 90ce2bb1a5
4 changed files with 53 additions and 35 deletions

View File

@@ -52,8 +52,8 @@ local function run(...)
loadFn = loadfile
end
local fn, err = loadFn(path, env)
if not fn then
local bill, err = loadFn(path, env)
if not bill then
error(err, -1)
end
@@ -68,7 +68,7 @@ local function run(...)
}
env[ "arg" ] = { [0] = path, table.unpack(args) }
local r = { fn(table.unpack(args)) }
local r = { bill(table.unpack(args)) }
tProgramStack[#tProgramStack] = nil