Diff

init.lua @ 385:e6bf19ad5c19

verse: Pass on error from trying to require verse connection module
author Kim Alvefur <zash@zash.se>
date Sun, 17 May 2015 15:00:30 +0200
parent 382:479b856a910f
child 399:82ad158714e5
line wrap: on
line diff
--- a/init.lua	Sun May 17 14:59:28 2015 +0200
+++ b/init.lua	Sun May 17 15:00:30 2015 +0200
@@ -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,...)..err);
 		end
 	end
 	return verse;