From d294e9afd7ed00043dc142feec8c4496caaa576b Mon Sep 17 00:00:00 2001 From: lidongy <1879087903@qq.com> Date: Sun, 27 Sep 2020 17:24:54 +0800 Subject: [PATCH] =?UTF-8?q?DEC-15199=20fix:=20=E5=86=8Dcatch=E4=B8=80?= =?UTF-8?q?=E4=B8=AAthrowable=EF=BC=8C=E6=8D=95=E8=8E=B7=E6=9C=AA=E7=9F=A5?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/third/alibaba/druid/pool/DruidDataSource.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidDataSource.java b/fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidDataSource.java index c1c3b1237..13c9ecdd6 100644 --- a/fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidDataSource.java +++ b/fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidDataSource.java @@ -822,7 +822,11 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat throw e; } catch (InterruptedException e) { throw new SQLException(e.getMessage(), e); - } finally { + } catch (Throwable e) { + initException = new SQLException(e.getMessage()); + throw e; + } + finally { inited = true; lock.unlock();