Add connectionString to SQLException reports, if defined
This commit is contained in:
parent
1457224fd9
commit
57aabecb7a
2 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue