Comparison

init.lua @ 369:074c547fe05a

init: Log the error message that caused loading of a connection module to fail
author Matthew Wild <mwild1@gmail.com>
date Sat, 05 Sep 2015 15:13:52 +0100
parent 368:154c2f04d73b
child 399:82ad158714e5
comparison
equal deleted inserted replaced
368:154c2f04d73b 369:074c547fe05a
21 21
22 verse.plugins = {}; 22 verse.plugins = {};
23 23
24 function verse.init(...) 24 function verse.init(...)
25 for i=1,select("#", ...) do 25 for i=1,select("#", ...) do
26 local ok = pcall(require, "verse."..select(i,...)); 26 local ok, err = pcall(require, "verse."..select(i,...));
27 if not ok then 27 if not ok then
28 error("Verse connection module not found: verse."..select(i,...)); 28 error("Verse connection module not found: verse."..select(i,...).."\n"..err);
29 end 29 end
30 end 30 end
31 return verse; 31 return verse;
32 end 32 end
33 33