This is an automated email from the ASF dual-hosted git repository.

yuqi4733 pushed a commit to branch branch-1.1
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/branch-1.1 by this push:
     new 3248301ad1 [#9660] improve(lance): separate the exception message 
(#9672)
3248301ad1 is described below

commit 3248301ad116e14132d49024b8697ed8f3bf6ccb
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Jan 12 10:52:28 2026 +0800

    [#9660] improve(lance): separate the exception message (#9672)
    
    <!--
    1. Title: [#<issue>] <type>(<scope>): <subject>
       Examples:
         - "[#123] feat(operator): support xxx"
         - "[#233] fix: check null before access result in xxx"
         - "[MINOR] refactor: fix typo in variable name"
         - "[MINOR] docs: fix typo in README"
         - "[#255] test: fix flaky test NameOfTheTest"
       Reference: https://www.conventionalcommits.org/en/v1.0.0/
    2. If the PR is unfinished, please mark this PR as draft.
    -->
    
    ### What changes were proposed in this pull request?
    to close #9660
    
    
    ### Why are the changes needed?
    
    
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    
    ### How was this patch tested?
    no need
    
    Co-authored-by: Jarvis <[email protected]>
---
 .../ops/gravitino/GravitinoLanceNameSpaceOperations.java       | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/lance/lance-common/src/main/java/org/apache/gravitino/lance/common/ops/gravitino/GravitinoLanceNameSpaceOperations.java
 
b/lance/lance-common/src/main/java/org/apache/gravitino/lance/common/ops/gravitino/GravitinoLanceNameSpaceOperations.java
index ee21c8cb1b..21052421d4 100644
--- 
a/lance/lance-common/src/main/java/org/apache/gravitino/lance/common/ops/gravitino/GravitinoLanceNameSpaceOperations.java
+++ 
b/lance/lance-common/src/main/java/org/apache/gravitino/lance/common/ops/gravitino/GravitinoLanceNameSpaceOperations.java
@@ -340,12 +340,18 @@ public class GravitinoLanceNameSpaceOperations implements 
LanceNamespaceOperatio
         }
         return new DropNamespaceResponse(); // SKIP mode
       }
-    } catch (NonEmptyCatalogException | CatalogInUseException e) {
+    } catch (NonEmptyCatalogException e) {
       throw LanceNamespaceException.badRequest(
-          String.format("Catalog %s is not empty or in used", catalogName),
+          String.format("Catalog %s is not empty", catalogName),
           NonEmptyCatalogException.class.getSimpleName(),
           catalogName,
           CommonUtil.formatCurrentStackTrace());
+    } catch (CatalogInUseException e) {
+      throw LanceNamespaceException.badRequest(
+          String.format("Catalog %s is in use", catalogName),
+          CatalogInUseException.class.getSimpleName(),
+          catalogName,
+          CommonUtil.formatCurrentStackTrace());
     }
   }
 

Reply via email to