Changeset

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
parents 368:154c2f04d73b
children 370:75e7917761c0
files init.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/init.lua	Sun Nov 16 19:33:18 2014 +0100
+++ b/init.lua	Sat Sep 05 15:13:52 2015 +0100
@@ -23,9 +23,9 @@
 
 function verse.init(...)
 	for i=1,select("#", ...) do
-		local ok = pcall(require, "verse."..select(i,...));
+		local ok, err = pcall(require, "verse."..select(i,...));
 		if not ok then
-			error("Verse connection module not found: verse."..select(i,...));
+			error("Verse connection module not found: verse."..select(i,...).."\n"..err);
 		end
 	end
 	return verse;