From e0988f71630df59557356249fb9b5b46e699461c Mon Sep 17 00:00:00 2001 From: Qiang Zhao <74767115+mattisonchao@users.noreply.github.com> Date: Tue, 15 Jun 2021 10:44:57 +0800 Subject: [PATCH] [Fixed] throwable exception not thrown. (#10863) Fixes # throwable exception not thrown. ### Motivation I found some throwable exception that not thrown, maybe it's a bug. --- .../org/apache/pulsar/broker/admin/impl/NamespacesBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java index f6d69a0b96ed8..ec9de23e6233f 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java @@ -1377,7 +1377,7 @@ protected void internalSetBacklogQuota(BacklogQuotaType backlogQuotaType, Backlo "[{}] Failed to update backlog configuration" + " for namespace {}: conflicts with retention quota", clientAppId(), namespaceName); - new RestException(Status.PRECONDITION_FAILED, + throw new RestException(Status.PRECONDITION_FAILED, "Backlog Quota exceeds configured retention quota for namespace." + " Please increase retention quota and retry"); } @@ -1427,7 +1427,7 @@ protected void internalSetRetention(RetentionPolicies retention) { log.warn("[{}] Failed to update retention configuration" + " for namespace {}: conflicts with backlog quota", clientAppId(), namespaceName); - new RestException(Status.PRECONDITION_FAILED, + throw new RestException(Status.PRECONDITION_FAILED, "Retention Quota must exceed configured backlog quota for namespace."); } policies.retention_policies = retention;