From dda5b45bb1f08ab1f895261767eae18c2f81e4e8 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 15 Jan 2024 10:21:30 -0800 Subject: [PATCH] improve SQL exceptions to be more easily debuggable --- .../com/gmail/nossr50/database/SQLDatabaseManager.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java index dfc7c843c..64aeab1ad 100644 --- a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java @@ -129,7 +129,6 @@ public final class SQLDatabaseManager implements DatabaseManager { loadPool = new DataSource(poolProperties); checkStructure(); - } @NotNull @@ -1272,13 +1271,7 @@ public final class SQLDatabaseManager implements DatabaseManager { } private void printErrors(SQLException ex) { - if (debug || h2) { - ex.printStackTrace(); - } else { - for (StackTraceElement element : ex.getStackTrace()) { - logger.severe("Location: " + element.getClassName() + " " + element.getMethodName() + " " + element.getLineNumber()); - } - } + ex.printStackTrace(); // logger.severe("SQLException: " + ex.getMessage()); logger.severe("SQLState: " + ex.getSQLState());