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")); } }