From b31cc0420e77d34465e4cf7d7ab75df7755b44d6 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Wed, 22 Feb 2017 13:54:30 +0100 Subject: assert --- src/lauxlib.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/lauxlib.js') diff --git a/src/lauxlib.js b/src/lauxlib.js index c44780e..e295fe6 100644 --- a/src/lauxlib.js +++ b/src/lauxlib.js @@ -12,9 +12,7 @@ const CT = lua.constant_types; 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); - return 0; + throw new Error(`PANIC: unprotected error in call to Lua API (${lapi.lua_tostring(L, -1)})`); }; // const luaL_argerror = function(L, arg, extramsg) { -- cgit v1.2.3-54-g00ecf