aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-23 00:05:31 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-23 00:53:07 +1000
commitf6b260d2b97c40f360136d0c1320d8f6468f7e87 (patch)
tree21f25443c776603d4dde44c1c0b7ce7487a58dd3 /src
parentf7bb8409d6c57b5e9319f4f48d7d02f216b4cc32 (diff)
downloadfengari-f6b260d2b97c40f360136d0c1320d8f6468f7e87.tar.gz
fengari-f6b260d2b97c40f360136d0c1320d8f6468f7e87.tar.bz2
fengari-f6b260d2b97c40f360136d0c1320d8f6468f7e87.zip
src/ldo.js: luaG_runerror takes lua strings
Diffstat (limited to 'src')
-rw-r--r--src/ldo.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ldo.js b/src/ldo.js
index cda1274..701a211 100644
--- a/src/ldo.js
+++ b/src/ldo.js
@@ -59,7 +59,7 @@ const luaD_growstack = function(L, n) {
if (newsize < needed) newsize = needed;
if (newsize > luaconf.LUAI_MAXSTACK) { /* stack overflow? */
luaD_reallocstack(L, ERRORSTACKSIZE);
- ldebug.luaG_runerror(L, "stack overflow");
+ ldebug.luaG_runerror(L, defs.to_luastring("stack overflow", true));
}
else
luaD_reallocstack(L, newsize);
@@ -281,7 +281,7 @@ const tryfuncTM = function(L, off, func) {
*/
const stackerror = function(L) {
if (L.nCcalls === llimit.LUAI_MAXCCALLS)
- ldebug.luaG_runerror(L, "JS stack overflow");
+ ldebug.luaG_runerror(L, defs.to_luastring("JS stack overflow", true));
else if (L.nCcalls >= llimit.LUAI_MAXCCALLS + (llimit.LUAI_MAXCCALLS >> 3))
luaD_throw(L, TS.LUA_ERRERR); /* error while handing stack error */
};