add more error info.

This commit is contained in:
shaojin.wensj
2018-11-23 17:32:50 +08:00
parent 475a848d6f
commit 4ffa0525c4
2 changed files with 23 additions and 8 deletions
@@ -1150,14 +1150,6 @@ public class DruidPooledConnection extends PoolableWrapper implements javax.sql.
}
private void checkStateInternal() throws SQLException {
if (holder == null) {
if (disableError != null) {
throw new SQLException("connection holder is null", disableError);
} else {
throw new SQLException("connection holder is null");
}
}
if (closed) {
if (disableError != null) {
throw new SQLException("connection closed", disableError);
@@ -1173,6 +1165,14 @@ public class DruidPooledConnection extends PoolableWrapper implements javax.sql.
throw new SQLException("connection disabled");
}
}
if (holder == null) {
if (disableError != null) {
throw new SQLException("connection holder is null", disableError);
} else {
throw new SQLException("connection holder is null");
}
}
}
public String toString() {