Software /
code /
verse
Comparison
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 |
comparison
equal
deleted
inserted
replaced
384:532a379acfea | 385:e6bf19ad5c19 |
---|---|
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,...)..err); |
29 end | 29 end |
30 end | 30 end |
31 return verse; | 31 return verse; |
32 end | 32 end |
33 | 33 |