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()
local res, err = loadstring(text, file_path)
if not res then
error(err)
error(file_path .. ": " .. err)
end
return res
end

View File

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