mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-01-29 19:11:32 +01:00
Add connectionString to SQLException reports, if defined
This commit is contained in:
parent
4268b0b6c8
commit
2dd6664bdb
@ -20,6 +20,7 @@ import org.dynmap.utils.BufferOutputStream;
|
|||||||
* Generic interface for map data storage (image tiles, and associated hash codes)
|
* Generic interface for map data storage (image tiles, and associated hash codes)
|
||||||
*/
|
*/
|
||||||
public abstract class MapStorage {
|
public abstract class MapStorage {
|
||||||
|
protected String connectionString;
|
||||||
private static Object lock = new Object();
|
private static Object lock = new Object();
|
||||||
private static HashMap<String, Integer> filelocks = new HashMap<String, Integer>();
|
private static HashMap<String, Integer> filelocks = new HashMap<String, Integer>();
|
||||||
private static final Integer WRITELOCK = (-1);
|
private static final Integer WRITELOCK = (-1);
|
||||||
@ -462,6 +463,7 @@ public abstract class MapStorage {
|
|||||||
Log.severe("SQLException: " + opmsg);
|
Log.severe("SQLException: " + opmsg);
|
||||||
Log.severe(" ErrorCode: " + x.getErrorCode() + ", SQLState=" + x.getSQLState());
|
Log.severe(" ErrorCode: " + x.getErrorCode() + ", SQLState=" + x.getSQLState());
|
||||||
Log.severe(" Message: " + x.getMessage());
|
Log.severe(" Message: " + x.getMessage());
|
||||||
|
if (connectionString != null) Log.severe(" ConnectionString: " + connectionString);
|
||||||
Throwable cause = x.getCause();
|
Throwable cause = x.getCause();
|
||||||
while (cause != null) {
|
while (cause != null) {
|
||||||
Log.severe(" CausedBy: " + cause.getMessage());
|
Log.severe(" CausedBy: " + cause.getMessage());
|
||||||
|
@ -31,7 +31,6 @@ import org.dynmap.utils.BufferInputStream;
|
|||||||
import org.dynmap.utils.BufferOutputStream;
|
import org.dynmap.utils.BufferOutputStream;
|
||||||
|
|
||||||
public class MySQLMapStorage extends MapStorage {
|
public class MySQLMapStorage extends MapStorage {
|
||||||
protected String connectionString;
|
|
||||||
private String userid;
|
private String userid;
|
||||||
private String password;
|
private String password;
|
||||||
protected String database;
|
protected String database;
|
||||||
|
Loading…
Reference in New Issue
Block a user