diff options
Diffstat (limited to 'src/ldebug.js')
-rw-r--r-- | src/ldebug.js | 3 |
1 files changed, 2 insertions, 1 deletions
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); |