File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
core/trino-main/src/main/java/io/trino/connector Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 5454import static com .google .common .collect .ImmutableList .toImmutableList ;
5555import static io .airlift .configuration .ConfigurationLoader .loadPropertiesFrom ;
5656import static io .trino .spi .StandardErrorCode .CATALOG_NOT_AVAILABLE ;
57+ import static io .trino .spi .StandardErrorCode .CATALOG_NOT_FOUND ;
5758import static io .trino .spi .StandardErrorCode .NOT_SUPPORTED ;
5859import static io .trino .spi .connector .CatalogHandle .createRootCatalogHandle ;
5960import static io .trino .util .Executors .executeUntilFailure ;
@@ -214,7 +215,9 @@ public Set<CatalogHandle> getActiveCatalogs()
214215 public ConnectorServices getConnectorServices (CatalogHandle catalogHandle )
215216 {
216217 CatalogConnector catalogConnector = catalogs .get (catalogHandle .getCatalogName ());
217- checkArgument (catalogConnector != null , "No catalog '%s'" , catalogHandle .getCatalogName ());
218+ if (catalogConnector == null ) {
219+ throw new TrinoException (CATALOG_NOT_FOUND , "No catalog '%s'" .formatted (catalogHandle .getCatalogName ()));
220+ }
218221 return catalogConnector .getMaterializedConnector (catalogHandle .getType ());
219222 }
220223
You can’t perform that action at this time.
0 commit comments