jerqi commented on code in PR #5021:
URL: https://github.com/apache/gravitino/pull/5021#discussion_r1792698722
##########
core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java:
##########
@@ -309,10 +324,8 @@ private static void checkCatalogType(
NameIdentifier catalogIdent, Catalog.Type type, Privilege privilege) {
Catalog catalog =
GravitinoEnv.getInstance().catalogDispatcher().loadCatalog(catalogIdent);
if (catalog.type() != type) {
- throw new IllegalArgumentException(
- String.format(
- "Catalog %s type %s don't support privilege %s",
- catalogIdent, catalog.type(), privilege));
+ throw new IllegalPrivilegeException(
+ "Catalog %s type %s don't support privilege %s", catalogIdent,
catalog.type(), privilege);
Review Comment:
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]