projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Re-tagging 0.5.2
[prosody.git]
/
util
/
serialization.lua
diff --git
a/util/serialization.lua
b/util/serialization.lua
index bff0f306fef5ae0f78e1ba75f094ae7df02cedb4..c2bbbb8d9a332cfe6c05ae89b0d03b6f600c74c1 100644
(file)
--- a/
util/serialization.lua
+++ b/
util/serialization.lua
@@
-1,4
+1,4
@@
--- Prosody IM
v0.4
+-- Prosody IM
-- Copyright (C) 2008-2009 Matthew Wild
-- Copyright (C) 2008-2009 Waqas Hussain
--
-- Copyright (C) 2008-2009 Matthew Wild
-- Copyright (C) 2008-2009 Waqas Hussain
--
@@
-14,6
+14,8
@@
local t_concat = table.concat;
local error = error;
local pairs = pairs;
local error = error;
local pairs = pairs;
+local debug_traceback = debug.traceback;
+local log = require "util.logger".init("serialization");
module "serialization"
local indent = function(i)
module "serialization"
local indent = function(i)
@@
-50,7
+52,8
@@
local function _simplesave(o, ind, t, func)
elseif type(o) == "boolean" then
func(t, (o and "true" or "false"));
else
elseif type(o) == "boolean" then
func(t, (o and "true" or "false"));
else
- error("cannot serialize a " .. type(o))
+ log("error", "cannot serialize a %s: %s", type(o), debug_traceback())
+ func(t, "nil");
end
end
end
end