From 0bd95f16e2af2028f0a5c9b41478bca74f16cc99 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 4 May 2017 16:18:29 +1000 Subject: Add lua_pushfstring and lua_pushvstring --- src/ldebug.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ldebug.js') diff --git a/src/ldebug.js b/src/ldebug.js index 3bd5cf0..9c67f26 100644 --- a/src/ldebug.js +++ b/src/ldebug.js @@ -576,8 +576,9 @@ const luaG_addinfo = function(L, msg, src, line) { return L.stack[L.top - 1]; }; -const luaG_runerror = function(L, msg) { +const luaG_runerror = function(L, fmt, ...argp) { let ci = L.ci; + let msg = lobject.luaO_pushvfstring(L, fmt, argp); if (ci.callstatus & lstate.CIST_LUA) /* if Lua function, add source:line information */ luaG_addinfo(L, msg, ci.func.value.p.source, currentline(ci)); luaG_errormsg(L); -- cgit v1.2.3-54-g00ecf