mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
show file in error message in moon loader
This commit is contained in:
parent
6307c6a9c1
commit
727fe0eb1c
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user