aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-11-09 04:26:25 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-11-09 04:26:25 +0500
commit7b3ed77aef482bbb6fbae080ba9e847cd748b0bd (patch)
treeb1d415ce514f84d9b7f91bb8a0f1040130ac9756 /core
parentb96ce57db871f63b51e86f02a8d24129d3c2e60c (diff)
downloadprosody-7b3ed77aef482bbb6fbae080ba9e847cd748b0bd.tar.gz
prosody-7b3ed77aef482bbb6fbae080ba9e847cd748b0bd.zip
We now fail if modules fail to load at startup.
Diffstat (limited to 'core')
-rw-r--r--core/modulemanager.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 3e1dfa30..aadd89de 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -68,7 +68,7 @@ function load(name)
local mod, err = loadfile("plugins/mod_"..name..".lua");
if not mod then
log("error", "Unable to load module '%s': %s", name or "nil", err or "nil");
- return;
+ return nil, err;
end
local pluginenv = setmetatable({ module = { name = name } }, { __index = modulehelpers });
@@ -77,8 +77,9 @@ function load(name)
local success, ret = pcall(mod);
if not success then
log("error", "Error initialising module '%s': %s", name or "nil", ret or "nil");
- return;
+ return nil, err;
end
+ return true;
end
function handle_stanza(origin, stanza)