aboutsummaryrefslogtreecommitdiffstats
path: root/util/serialization.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-05-04 19:57:05 +0100
committerMatthew Wild <mwild1@gmail.com>2009-05-04 19:57:05 +0100
commit2fff09895975e5b2fb3d0aee38c2f652c6029e15 (patch)
treef0e16c01357473480d90a6d4726094fbb3aa30ec /util/serialization.lua
parent9817a326507ae8127365578adfac7a9074fe48c1 (diff)
parentef5e994b1f4303d7940194fc980f5b5e94654c76 (diff)
downloadprosody-2fff09895975e5b2fb3d0aee38c2f652c6029e15.tar.gz
prosody-2fff09895975e5b2fb3d0aee38c2f652c6029e15.zip
Merge with 0.4
Diffstat (limited to 'util/serialization.lua')
-rw-r--r--util/serialization.lua4
1 files changed, 3 insertions, 1 deletions
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