|
|
|
@ -9,5 +9,9 @@ lua.registerFunction('add', function(a, b){ |
|
|
|
lua.doStringSync("print('Result in Lua: ' .. add(10, 5))"); |
|
|
|
|
|
|
|
var lua_two = new nodelua.LuaState('two'); |
|
|
|
// this will throw an error
|
|
|
|
lua_two.doStringSync("add(10, 5)"); |
|
|
|
try{ |
|
|
|
lua_two.doStringSync("add(10, 5)"); |
|
|
|
} catch(e){ |
|
|
|
console.log("Error: "); |
|
|
|
console.log(e); |
|
|
|
} |