Add connectionString to SQLException reports, if defined

This commit is contained in:
Mike Primm 2022-01-18 22:07:07 -06:00
parent 4268b0b6c8
commit 2dd6664bdb
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ import org.dynmap.utils.BufferOutputStream;
* Generic interface for map data storage (image tiles, and associated hash codes)
*/
public abstract class MapStorage {
protected String connectionString;
private static Object lock = new Object();
private static HashMap<String, Integer> filelocks = new HashMap<String, Integer>();
private static final Integer WRITELOCK = (-1);
@ -462,6 +463,7 @@ public abstract class MapStorage {
Log.severe("SQLException: " + opmsg);
Log.severe(" ErrorCode: " + x.getErrorCode() + ", SQLState=" + x.getSQLState());
Log.severe(" Message: " + x.getMessage());
if (connectionString != null) Log.severe(" ConnectionString: " + connectionString);
Throwable cause = x.getCause();
while (cause != null) {
Log.severe(" CausedBy: " + cause.getMessage());

View File

@ -31,7 +31,6 @@ import org.dynmap.utils.BufferInputStream;
import org.dynmap.utils.BufferOutputStream;
public class MySQLMapStorage extends MapStorage {
protected String connectionString;
private String userid;
private String password;
protected String database;