Răsfoiți Sursa

Add more detailed error messages on SQL connection failure.

Fixes #1322
GJ 12 ani în urmă
părinte
comite
a345737b8b

+ 3 - 2
src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java

@@ -581,14 +581,15 @@ public final class SQLDatabaseManager implements DatabaseManager {
             connection = null;
             connection = null;
 
 
             if (reconnectAttempt == 0 || reconnectAttempt >= 11) {
             if (reconnectAttempt == 0 || reconnectAttempt >= 11) {
-                mcMMO.p.getLogger().info("Connection to MySQL failed!");
+                mcMMO.p.getLogger().severe("Connection to MySQL failed!");
+                printErrors(ex);
             }
             }
         }
         }
         catch (ClassNotFoundException ex) {
         catch (ClassNotFoundException ex) {
             connection = null;
             connection = null;
 
 
             if (reconnectAttempt == 0 || reconnectAttempt >= 11) {
             if (reconnectAttempt == 0 || reconnectAttempt >= 11) {
-                mcMMO.p.getLogger().info("MySQL database driver not found!");
+                mcMMO.p.getLogger().severe("MySQL database driver not found!");
             }
             }
         }
         }
     }
     }