You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auto db = g_dbManager.GetDatabase(connection_name);
40
42
if (!db && connection_name != "default_connection") {
41
43
PRINTF("Database connection \"%s\" doesn't exists inside the database configurations. Automatically falling back to \"default_connection\".\n", connection_name.c_str());
42
-
db = g_dbManager.GetDatabase("default_connection");
44
+
if (!shouldSkipDefaultConnection) db = g_dbManager.GetDatabase("default_connection");
43
45
}
44
46
45
-
if (!db->Connect()) {
47
+
if (!db) {
48
+
PRINTF("An error has occured while trying to connect to database \"%s\":\nError: Invalid connection inside `addons/swiftly/configs/databases.json`\n", connection_name.c_str());
49
+
}
50
+
elseif (!db->Connect()) {
46
51
PRINTF("An error has occured while trying to connect to database \"%s\":\nError: %s\n", connection_name.c_str(), db->GetError().c_str());
0 commit comments