From fc538c954a575269b7e799224d759bcc45dc0d28 Mon Sep 17 00:00:00 2001 From: wenshao Date: Wed, 29 Jun 2011 08:40:42 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0ExceptionSorter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://code.alibabatech.com/svn/druid/trunk@308 b9813039-fb51-4c41-a8b9-e21c2acb5095 --- .../com/alibaba/druid/pool/PoolableConnection.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/alibaba/druid/pool/PoolableConnection.java b/src/main/java/com/alibaba/druid/pool/PoolableConnection.java index 854a609535..73933187a5 100644 --- a/src/main/java/com/alibaba/druid/pool/PoolableConnection.java +++ b/src/main/java/com/alibaba/druid/pool/PoolableConnection.java @@ -55,10 +55,13 @@ public class PoolableConnection implements PooledConnection, Connection { } protected SQLException checkException(Throwable t) throws SQLException { - // if (mc != null) mc.connectionError(t); - // if (t instanceof SQLException) throw (SQLException) t; - // else throw new NestedSQLException("Error", t); - return null; + //if (mc != null) mc.connectionError(t); + + if (t instanceof SQLException) { + throw (SQLException) t; + } else { + throw new SQLException("Error", t); + } } void closePoolableStatement(PoolablePreparedStatement stmt) throws SQLException {