summaryrefslogtreecommitdiff
path: root/src/loslib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-04-18 15:20:37 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-04-18 15:20:37 +0200
commita02f4e93b92e7ebb7ef038ad151e51652b0ce84d (patch)
tree2b83cacef266ff88ca3ed8cf3f19c1a1cbea7b38 /src/loslib.js
parent924ca09e8e9ec765301868d90dd3eba98058cafb (diff)
downloadfengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.tar.gz
fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.tar.bz2
fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.zip
No more Table, just TValue with table type and Map value
Diffstat (limited to 'src/loslib.js')
-rw-r--r--src/loslib.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/loslib.js b/src/loslib.js
index 20675a1..a319b3b 100644
--- a/src/loslib.js
+++ b/src/loslib.js
@@ -33,14 +33,14 @@ const getfield = function(L, key, d, delta) {
let res = lapi.lua_tointegerx(L, -1);
if (res !== false) { /* field is not an integer? */
if (t != lua.CT.LUA_TNIL) /* some other value? */
- return lauxlib.luaL_error(L, `field '${key}' is not an integer`);
+ return lauxlib.luaL_error(L, lua.to_luastring(`field '${key}' is not an integer`), true);
else if (d < 0) /* absent field; no default? */
- return lauxlib.luaL_error(L, `field '${key}' missing in date table`);
+ return lauxlib.luaL_error(L, lua.to_luastring(`field '${key}' missing in date table`), true);
res = d;
}
else {
if (!(-L_MAXDATEFIELD <= res && res <= L_MAXDATEFIELD))
- return lauxlib.luaL_error(L, `field '${key}' is out-of-bound`);
+ return lauxlib.luaL_error(L, lua.to_luastring(`field '${key}' is out-of-bound`), true);
res -= delta;
}
lapi.lua_pop(L, 1);