diff options
Diffstat (limited to 'net/connlisteners.lua')
-rw-r--r-- | net/connlisteners.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/connlisteners.lua b/net/connlisteners.lua index ebb3cc18..230d92a4 100644 --- a/net/connlisteners.lua +++ b/net/connlisteners.lua @@ -11,6 +11,7 @@ local listeners_dir = (CFG_SOURCEDIR or ".").."/net/"; local server = require "net.server"; local log = require "util.logger".init("connlisteners"); +local tostring = tostring; local dofile, pcall, error = dofile, pcall, error @@ -37,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; |