--- Prosody IM v0.2
--- Copyright (C) 2008 Matthew Wild
--- Copyright (C) 2008 Waqas Hussain
+-- Prosody IM v0.4
+-- Copyright (C) 2008-2009 Matthew Wild
+-- Copyright (C) 2008-2009 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
local error = error;
local pairs = pairs;
+local debug_traceback = debug.traceback;
+local log = require "util.logger".init("serialization");
module "serialization"
local indent = function(i)
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