Comparison

core/modulemanager.lua @ 6660:30672cc3d8ee

modulemanager: Remove unused import of pcall #luacheck
author Matthew Wild <mwild1@gmail.com>
date Wed, 06 May 2015 19:15:35 +0100
parent 6422:6d4d87a89026
child 6661:90e846e8a788
comparison
equal deleted inserted replaced
6659:0a494394cd3e 6660:30672cc3d8ee
15 local new_multitable = require "util.multitable".new; 15 local new_multitable = require "util.multitable".new;
16 16
17 local hosts = hosts; 17 local hosts = hosts;
18 local prosody = prosody; 18 local prosody = prosody;
19 19
20 local pcall, xpcall = pcall, xpcall; 20 local xpcall = xpcall;
21 local setmetatable, rawget = setmetatable, rawget; 21 local setmetatable, rawget = setmetatable, rawget;
22 local ipairs, pairs, type, tostring, t_insert = ipairs, pairs, type, tostring, table.insert; 22 local ipairs, pairs, type, tostring, t_insert = ipairs, pairs, type, tostring, table.insert;
23 23
24 local debug_traceback = debug.traceback; 24 local debug_traceback = debug.traceback;
25 local unpack, select = unpack, select; 25 local unpack, select = unpack, select;
26 pcall = function(f, ...) 26 local pcall = function(f, ...)
27 local n = select("#", ...); 27 local n = select("#", ...);
28 local params = {...}; 28 local params = {...};
29 return xpcall(function() return f(unpack(params, 1, n)) end, function(e) return tostring(e).."\n"..debug_traceback(); end); 29 return xpcall(function() return f(unpack(params, 1, n)) end, function(e) return tostring(e).."\n"..debug_traceback(); end);
30 end 30 end
31 31