Skip to content

Commit a09087d

Browse files
ksobolewebyhr
authored andcommitted
Throw a correct exception from SqlServerClient#listSchemas
Do not throw a generic `RuntimeException`, but a correct `TrinoException` with the `JDBC_ERROR` error code. This is, among other things, what the test framework requires.
1 parent 854165d commit a09087d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ public Collection<String> listSchemas(Connection connection)
394394
return schemaNames.build();
395395
}
396396
catch (SQLException e) {
397-
throw new RuntimeException(e);
397+
throw new TrinoException(JDBC_ERROR, e);
398398
}
399399
}
400400

0 commit comments

Comments
 (0)