Software /
code /
prosody
Comparison
net/connlisteners.lua @ 721:51233a8ae3d4
net.connlisteners: Fix to report errors loading connlisteners
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 15 Jan 2009 20:02:28 +0000 |
parent | 661:59c3f9a49969 |
child | 739:1def06cd9311 |
comparison
equal
deleted
inserted
replaced
720:8f22e9fb2291 | 721:51233a8ae3d4 |
---|---|
55 end | 55 end |
56 | 56 |
57 local wrapper_functions = { tcp = server.wraptcpclient, ssl = server.wrapsslclient, tls = server.wraptlsclient } | 57 local wrapper_functions = { tcp = server.wraptcpclient, ssl = server.wrapsslclient, tls = server.wraptlsclient } |
58 | 58 |
59 function start(name, udata) | 59 function start(name, udata) |
60 local h = get(name); | 60 local h, err = get(name); |
61 if not h then | 61 if not h then |
62 error("No such connection module: "..name, 0); | 62 error("No such connection module: "..name.. (err and (" ("..err..")") or ""), 0); |
63 end | 63 end |
64 | 64 |
65 local wrapper_function = wrapper_functions[(udata and udata.type)] or wrapper_functions.tcp; | 65 local wrapper_function = wrapper_functions[(udata and udata.type)] or wrapper_functions.tcp; |
66 | 66 |
67 return server.add(h, | 67 return server.add(h, |