aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-11-12 13:34:38 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-11-12 13:34:38 +0500
commit41079afbb43ebd56b5aa5cc43da2e84120c0b012 (patch)
tree62154f146092954d2593ad9e97103c66f10c1182
parent22394b083237d23d96c95ee85823098ae77efd12 (diff)
downloadprosody-41079afbb43ebd56b5aa5cc43da2e84120c0b012.tar.gz
prosody-41079afbb43ebd56b5aa5cc43da2e84120c0b012.zip
net.connlisteners: Log an error when a listener fails to load.
-rw-r--r--net/connlisteners.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/connlisteners.lua b/net/connlisteners.lua
index 932cd9cb..230d92a4 100644
--- a/net/connlisteners.lua
+++ b/net/connlisteners.lua
@@ -38,7 +38,10 @@ function get(name)
local h = listeners[name];
if not h then
local ok, ret = pcall(dofile, listeners_dir..name:gsub("[^%w%-]", "_").."_listener.lua");
- if not ok then return nil, ret; end
+ if not ok then
+ log("error", "Error while loading listener '%s': %s", tostring(name), tostring(ret));
+ return nil, ret;
+ end
h = listeners[name];
end
return h;