Closed johnd0e closed 1 year ago
Just updated a version and forgot fixing this problem. You might use
local yue = require("yue")
local function yue_loadfile(fname, ...)
local res, err = yue.read_file(fname)
if not res then
return nil, err
end
return yue.loadstring(res, fname, ...)
end
Before making another release.
At the moment I'm trying to use
yue
as drop-in replacement formoonscript
. And I found thatyue.loadfile
behaves differently.I see here two inconsistecies:
loadfile
inmoonscript
(as well as standard lua loadfile) does not throw errors: it return errors as message instead.