From 82ef443de9a3ba53b4a5b9abd161ddc164776a59 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Tue, 21 Feb 2017 12:53:41 +0100 Subject: Use correct luaG errors instead of throwing Errors --- src/lauxlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lauxlib.js') diff --git a/src/lauxlib.js b/src/lauxlib.js index b879446..3ebcc7d 100644 --- a/src/lauxlib.js +++ b/src/lauxlib.js @@ -14,7 +14,7 @@ const LUA_LOADED_TABLE = "_LOADED" const panic = function(L) { let msg = `PANIC: unprotected error in call to Lua API (${lapi.lua_tostring(L, -1)})`; console.error(msg); - throw new Error(msg); + return 0; }; // const luaL_argerror = function(L, arg, extramsg) { -- cgit v1.2.3-54-g00ecf