util/datamanager.lua

changeset 3845
4860853fc97b
parent 3844
9cdc19ed3034
equal deleted inserted replaced
3844:9cdc19ed3034 3845:4860853fc97b
217 local items = {}; 217 local items = {};
218 setfenv(data, {item = function(i) t_insert(items, i); end}); 218 setfenv(data, {item = function(i) t_insert(items, i); end});
219 local success, ret = pcall(data); 219 local success, ret = pcall(data);
220 if not success then 220 if not success then
221 log("error", "Unable to load "..datastore.." storage ('"..ret.."') for user: "..(username or "nil").."@"..(host or "nil")); 221 log("error", "Unable to load "..datastore.." storage ('"..ret.."') for user: "..(username or "nil").."@"..(host or "nil"));
222 return nil; 222 return nil, "Error reading storage";
223 end 223 end
224 return items; 224 return items;
225 end 225 end
226 226
227 return _M; 227 return _M;

mercurial