Comparison

plugins/mod_storage_sql.lua @ 13611:3a23116cf063

mod_storage_sql: Remove the word 'error' from debug messages The word 'error' anywhere, especially in harmless debug messages, are too often interpreted as fatal errors my some users, so best avoid that word. These look too scary as it is, being tracebacks.
author Kim Alvefur <zash@zash.se>
date Wed, 08 Jan 2025 22:30:30 +0100
parent 13318:4a437dd62cc9
child 13633:6b84d11aa09b
comparison
equal deleted inserted replaced
13610:ff0f4d1f16c8 13611:3a23116cf063
12 local t_concat = table.concat; 12 local t_concat = table.concat;
13 13
14 local have_dbisql, dbisql = pcall(require, "prosody.util.sql"); 14 local have_dbisql, dbisql = pcall(require, "prosody.util.sql");
15 local have_sqlite, sqlite = pcall(require, "prosody.util.sqlite3"); 15 local have_sqlite, sqlite = pcall(require, "prosody.util.sqlite3");
16 if not have_dbisql then 16 if not have_dbisql then
17 module:log("debug", "Could not load LuaDBI, error was: %s", dbisql) 17 module:log("debug", "Could not load LuaDBI: %s", dbisql)
18 dbisql = nil; 18 dbisql = nil;
19 end 19 end
20 if not have_sqlite then 20 if not have_sqlite then
21 module:log("debug", "Could not load LuaSQLite3, error was: %s", sqlite) 21 module:log("debug", "Could not load LuaSQLite3: %s", sqlite)
22 sqlite = nil; 22 sqlite = nil;
23 end 23 end
24 if not (have_dbisql or have_sqlite) then 24 if not (have_dbisql or have_sqlite) then
25 module:log("error", "LuaDBI or LuaSQLite3 are required for using SQL databases but neither are installed"); 25 module:log("error", "LuaDBI or LuaSQLite3 are required for using SQL databases but neither are installed");
26 module:log("error", "Please install at least one of LuaDBI and LuaSQLite3. See https://prosody.im/doc/depends"); 26 module:log("error", "Please install at least one of LuaDBI and LuaSQLite3. See https://prosody.im/doc/depends");