add error detail info

This commit is contained in:
wenshao
2013-02-28 22:20:38 +08:00
parent 7225c85992
commit 907063f33e
@@ -1012,8 +1012,16 @@ public class DruidPooledConnection extends PoolableWrapper implements javax.sql.
}
public void checkState() throws SQLException {
if (holder == null || closed || disable) {
throw new SQLException("connection is closed");
if (holder == null) {
throw new SQLException("connection holder is null");
}
if (closed) {
throw new SQLException("connection closed");
}
if (disable) {
throw new SQLException("connection disabled");
}
}