aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/multitable.lua4
-rw-r--r--util/serialization.lua4
2 files changed, 5 insertions, 3 deletions
diff --git a/util/multitable.lua b/util/multitable.lua
index c0bb2205..d1858d8f 100644
--- a/util/multitable.lua
+++ b/util/multitable.lua
@@ -56,7 +56,7 @@ local function r(t, n, _end, ...)
return;
end
if k then
- v = t[k];
+ local v = t[k];
if v then
r(v, n+1, _end, ...);
if not next(v) then
@@ -96,7 +96,7 @@ local function s(t, n, results, _end, ...)
return;
end
if k then
- v = t[k];
+ local v = t[k];
if v then
s(v, n+1, results, _end, ...);
end
diff --git a/util/serialization.lua b/util/serialization.lua
index bff0f306..41d963e9 100644
--- a/util/serialization.lua
+++ b/util/serialization.lua
@@ -14,6 +14,8 @@ local t_concat = table.concat;
local error = error;
local pairs = pairs;
+local debug_traceback = debug.traceback;
+local log = require "util.logger".init("serialization");
module "serialization"
local indent = function(i)
@@ -50,7 +52,7 @@ local function _simplesave(o, ind, t, func)
elseif type(o) == "boolean" then
func(t, (o and "true" or "false"));
else
- error("cannot serialize a " .. type(o))
+ log("warn", "cannot serialize a %s: %s", type(o), debug_traceback())
end
end