Merge pull request #1385 from DataDog/tyler/extend-jdbc-catch

Extend JDBC catch to include Errors
This commit is contained in:
Tyler Benson 2020-04-21 14:51:35 -04:00 committed by GitHub
commit cd3cbc9c2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ public class JDBCDecorator extends DatabaseClientDecorator<DBInfo> {
if (url != null) {
try {
dbInfo = JDBCConnectionUrlParser.parse(url, connection.getClientInfo());
} catch (final Exception ex) {
} catch (final Throwable ex) {
// getClientInfo is likely not allowed.
dbInfo = JDBCConnectionUrlParser.parse(url, null);
}

View File

@ -251,7 +251,7 @@ class TestConnection implements Connection {
@Override
Properties getClientInfo() throws SQLException {
throw new UnsupportedOperationException("Test 123")
throw new Throwable("Test 123")
}
@Override