@@ -160,7 +159,7 @@ public abstract class AbstractConnectionAdapter extends AbstractUnsupportedOpera
for(Connectioneach:result){
each.close();
}
thrownewShardingException(String.format("Could't get %d connections one time, partition succeed connection(%d) have released!",connectionSize,result.size()));
thrownewSQLException(String.format("Could't get %d connections one time, partition succeed connection(%d) have released!",connectionSize,result.size()),ex);
@@ -130,11 +130,11 @@ public final class JDBCBackendDataSource implements BackendDataSource, AutoClose
for(inti=0;i<connectionSize;i++){
try{
result.add(dataSource.getConnection());
}catch(finalSQLExceptionignored){
}catch(finalSQLExceptionex){
for(Connectioneach:result){
each.close();
}
thrownewShardingException(String.format("Could't get %d connections one time, partition succeed connection(%d) have released!",connectionSize,result.size()));
thrownewSQLException(String.format("Could't get %d connections one time, partition succeed connection(%d) have released!",connectionSize,result.size()),ex);