From 4d402c7229c4bbbfa836565bc06c1db66cbe3b1e Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Tue, 19 Aug 2014 19:11:07 -0400 Subject: [PATCH] Use correct element --- .../java/com/gmail/nossr50/database/SQLDatabaseManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java index c9d901fe7..5fb34bb01 100644 --- a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java @@ -1291,7 +1291,7 @@ public final class SQLDatabaseManager implements DatabaseManager { } private void printErrors(SQLException ex) { - StackTraceElement element = ex.getStackTrace()[ex.getStackTrace().length - 1]; + StackTraceElement element = ex.getStackTrace()[0]; mcMMO.p.getLogger().severe("Location: " + element.getClassName() + " " + element.getMethodName() + " " + element.getLineNumber()); mcMMO.p.getLogger().severe("SQLException: " + ex.getMessage()); mcMMO.p.getLogger().severe("SQLState: " + ex.getSQLState());