fix(TDI-38107): use a more clear exception information to replace NPE

exception if get null when use talend data source to fetch connection
for db components
This commit is contained in:
wang wei
2017-01-10 10:32:56 +08:00
parent b10b6fada5
commit 962a0ac6d2

View File

@@ -30,6 +30,8 @@ public class TalendDataSource {
Connection conn = ds.getConnection();
if (conn != null) {
conns.add(conn);
} else {
throw new RuntimeException("Unable to get a pooled database connection from pool");
}
return conn;
}