From b596c16ca2ade4ebfcf3ab009e9e29dcb798fe84 Mon Sep 17 00:00:00 2001 From: chengyouling Date: Wed, 6 Dec 2023 15:07:38 +0800 Subject: [PATCH] fixed exception class --- .../apache/servicecomb/transport/highway/HighwayTransport.java | 2 +- .../servicecomb/transport/rest/vertx/VertxRestTransport.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayTransport.java b/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayTransport.java index 48ff052813..d1487a9aae 100644 --- a/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayTransport.java +++ b/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayTransport.java @@ -52,7 +52,7 @@ public boolean init() throws Exception { if ((boolean)result.get("code")) { return true; } else { - throw new Exception((String) result.get("message")); + throw new IllegalStateException((String) result.get("message")); } } diff --git a/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/VertxRestTransport.java b/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/VertxRestTransport.java index ff8f59a13b..86247f50e0 100644 --- a/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/VertxRestTransport.java +++ b/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/VertxRestTransport.java @@ -111,7 +111,7 @@ public boolean init() throws Exception { if ((boolean)result.get("code")) { return true; } else { - throw new Exception((String) result.get("message")); + throw new IllegalStateException((String) result.get("message")); } }