show file in error message in moon loader

This commit is contained in:
leaf corcoran 2014-02-05 13:08:27 -08:00
parent 6307c6a9c1
commit 727fe0eb1c
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ moon_loader = function(name)
file:close() file:close()
local res, err = loadstring(text, file_path) local res, err = loadstring(text, file_path)
if not res then if not res then
error(err) error(file_path .. ": " .. err)
end end
return res return res
end end

View File

@ -48,7 +48,7 @@ moon_loader = (name) ->
file\close! file\close!
res, err = loadstring text, file_path res, err = loadstring text, file_path
if not res if not res
error err error file_path .. ": " .. err
return res return res