Browse Source

Pull request #6456: REPORT-77015 Druid连接失败时抛出的报错不方便直接查看原因,10.0是可以的

Merge in CORE/base-third from ~MAXIMUS/base-third:release/11.0 to release/11.0

* commit 'c80c28153a62f9be5e1d1c1dc098cd523b8a0080':
  REPORT-77015 Druid连接失败时抛出的报错不方便直接查看原因,10.0是可以的
release/11.0
Maximus 2 years ago
parent
commit
8ceac60097
  1. 4
      fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidDataSource.java

4
fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidDataSource.java

@ -1830,7 +1830,11 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
String errorMessage = buf.toString(); String errorMessage = buf.toString();
if (createError != null) { if (createError != null) {
if (createError instanceof SQLException) {
throw (SQLException)createError;
} else {
throw new GetConnectionTimeoutException(errorMessage, createError); throw new GetConnectionTimeoutException(errorMessage, createError);
}
} else { } else {
throw new GetConnectionTimeoutException(errorMessage); throw new GetConnectionTimeoutException(errorMessage);
} }

Loading…
Cancel
Save