Diff

plugins/mod_storage_sql.lua @ 9492:c03c60a2dede

mod_storage_sql: Have :users() throw an error on failure instead of returning non-iterator values
author Matthew Wild <mwild1@gmail.com>
date Thu, 11 Oct 2018 19:15:46 +0100
parent 9479:3a683b2476e2
child 9493:55b40f3fa659
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua	Fri Oct 12 03:43:56 2018 +0200
+++ b/plugins/mod_storage_sql.lua	Thu Oct 11 19:15:46 2018 +0100
@@ -142,7 +142,7 @@
 		]];
 		return engine:select(select_sql, host, self.store);
 	end);
-	if not ok then return ok, result end
+	if not ok then error(result); end
 	return iterator(result);
 end