Permalink
Browse files

0002958: Log message about catalog, schema and table use for lookup if

an exception occurs while looking up a table
  • Loading branch information...
1 parent 5902c9b commit e6445b9257f451161d8dcb56a383ff4e22c8f634 @chenson42 chenson42 committed Jan 11, 2017
@@ -563,9 +563,9 @@ public Table execute(Connection connection) throws SQLException {
ResultSet tableData = null;
try {
- log.debug("getting table metadata for " + table);
+ log.debug("getting table metadata for {}", table);
tableData = metaData.getTables(getTableNamePattern(table));
- log.debug("done getting table metadata for " + table);
+ log.debug("done getting table metadata for {}", table);
if (tableData != null && tableData.next()) {
Map<String, Object> values = readMetaData(tableData, initColumnsForTable());
return readTable(connection, metaData, values);
@@ -581,6 +581,7 @@ public Table execute(Connection connection) throws SQLException {
if (e.getMessage()!=null && StringUtils.containsIgnoreCase(e.getMessage(), "does not exist")) {
return null;
} else {
+ log.error("Failed to get metadata for {}", Table.getFullyQualifiedTableName(catalog, schema, table));
throw e;
}
}

0 comments on commit e6445b9

Please sign in to comment.