From 41079afbb43ebd56b5aa5cc43da2e84120c0b012 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Thu, 12 Nov 2009 13:34:38 +0500 Subject: net.connlisteners: Log an error when a listener fails to load. --- net/connlisteners.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'net') 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; -- cgit v1.2.3