Software /
code /
prosody
Changeset
2076:de2ae849b0b3
net.connlisteners: Log an error when a listener fails to load.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 12 Nov 2009 13:34:38 +0500 |
parents | 2075:b4bfa6cb3d83 |
children | 2077:e33658f6052c |
files | net/connlisteners.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/connlisteners.lua Thu Nov 12 13:33:46 2009 +0500 +++ b/net/connlisteners.lua Thu Nov 12 13:34:38 2009 +0500 @@ -38,7 +38,10 @@ 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;