]> git.lizzy.rs Git - metalua.git/blobdiff - src/compiler/mlc.mlua
IPC communication between processes through tmp files: avoids interferences caused...
[metalua.git] / src / compiler / mlc.mlua
index e488546820e0e8dcc1672b0909b5940d898586f3..a3eeb6f6585a9c4c8e7a68d1f82f14c982c42573 100644 (file)
@@ -77,7 +77,7 @@ function mlc.convert (x, src_fmt, dst_fmt, name)
 
    if not name then name = '@'..x end
    local f, msg = io.open(x, "rb")
-   if not f then error(msg) end
+   if not f then error("While trying to open file '"..x.."': "..msg) end
    x = f:read'*a'
    f:close()
    
@@ -149,6 +149,8 @@ mlc.luacstring_of_function = string.dump
 
 lua_loadstring = loadstring
 local lua_loadstring = loadstring
+lua_loadfile = loadfile
+local lua_loadfile = loadfile
 
 function loadstring(str, name)
    if type(str) ~= 'string' then error 'string expected' end
@@ -190,5 +192,3 @@ function dofile(name)
    if not f then error(msg) end
    return f()
 end
-
-