aboutsummaryrefslogtreecommitdiff
path: root/src/lauxlib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-21 12:53:41 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-21 13:03:58 +0100
commit82ef443de9a3ba53b4a5b9abd161ddc164776a59 (patch)
treeb28dea891d19c1cb472551d4f2b24844e94b44e9 /src/lauxlib.js
parente111f5cb7a21455df2c62eb65cd7b38aac0d834c (diff)
downloadfengari-82ef443de9a3ba53b4a5b9abd161ddc164776a59.tar.gz
fengari-82ef443de9a3ba53b4a5b9abd161ddc164776a59.tar.bz2
fengari-82ef443de9a3ba53b4a5b9abd161ddc164776a59.zip
Use correct luaG errors instead of throwing Errors
Diffstat (limited to 'src/lauxlib.js')
-rw-r--r--src/lauxlib.js2
1 files changed, 1 insertions, 1 deletions
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) {