Tue, 16 Dec 2008 02:32:01 +0000
Protect loading of connlisteners, to catch errors
net/connlisteners.lua | file | annotate | diff | comparison | revisions |
--- a/net/connlisteners.lua Tue Dec 16 02:30:24 2008 +0000 +++ b/net/connlisteners.lua Tue Dec 16 02:32:01 2008 +0000 @@ -47,7 +47,8 @@ function get(name) local h = listeners[name]; if not h then - pcall(dofile, listeners_dir..name:gsub("[^%w%-]", "_").."_listener.lua"); + local ok, ret = pcall(dofile, listeners_dir..name:gsub("[^%w%-]", "_").."_listener.lua"); + if not ok then return nil, ret; end h = listeners[name]; end return h;