Software /
code /
prosody
Comparison
core/modulemanager.lua @ 3588:1e570ed17147
modulemanager: Fixed: Locally defined pcall wasn't returning return values of the called function.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 10 Nov 2010 05:30:46 +0500 |
parent | 3587:d94aacb2771a |
child | 3595:ec1151d0c4a4 |
comparison
equal
deleted
inserted
replaced
3587:d94aacb2771a | 3588:1e570ed17147 |
---|---|
32 local debug_traceback = debug.traceback; | 32 local debug_traceback = debug.traceback; |
33 local unpack, select = unpack, select; | 33 local unpack, select = unpack, select; |
34 pcall = function(f, ...) | 34 pcall = function(f, ...) |
35 local n = select("#", ...); | 35 local n = select("#", ...); |
36 local params = {...}; | 36 local params = {...}; |
37 return xpcall(function() f(unpack(params, 1, n)) end, function(e) return tostring(e).."\n"..debug_traceback(); end); | 37 return xpcall(function() return f(unpack(params, 1, n)) end, function(e) return tostring(e).."\n"..debug_traceback(); end); |
38 end | 38 end |
39 | 39 |
40 local array, set = require "util.array", require "util.set"; | 40 local array, set = require "util.array", require "util.set"; |
41 | 41 |
42 local autoload_modules = {"presence", "message", "iq"}; | 42 local autoload_modules = {"presence", "message", "iq"}; |