summaryrefslogtreecommitdiff
path: root/src/loslib.js
diff options
context:
space:
mode:
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);