mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 14:16:45 +01:00
improve SQL exceptions to be more easily debuggable
This commit is contained in:
parent
009d809d76
commit
dda5b45bb1
@ -129,7 +129,6 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
loadPool = new DataSource(poolProperties);
|
loadPool = new DataSource(poolProperties);
|
||||||
|
|
||||||
checkStructure();
|
checkStructure();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -1272,13 +1271,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void printErrors(SQLException ex) {
|
private void printErrors(SQLException ex) {
|
||||||
if (debug || h2) {
|
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
} else {
|
|
||||||
for (StackTraceElement element : ex.getStackTrace()) {
|
|
||||||
logger.severe("Location: " + element.getClassName() + " " + element.getMethodName() + " " + element.getLineNumber());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// logger.severe("SQLException: " + ex.getMessage());
|
// logger.severe("SQLException: " + ex.getMessage());
|
||||||
logger.severe("SQLState: " + ex.getSQLState());
|
logger.severe("SQLState: " + ex.getSQLState());
|
||||||
|
Loading…
Reference in New Issue
Block a user