From 23fd5679ed5e182b05cba815d1fb2e2cbd6959b4 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 11 Oct 2018 19:15:46 +0100 Subject: mod_storage_sql: Have :users() throw an error on failure instead of returning non-iterator values --- plugins/mod_storage_sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_storage_sql.lua') diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index 395e937d..5f02aa06 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -142,7 +142,7 @@ function keyval_store:users() ]]; 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 -- cgit v1.2.3