ExceptionUtils { public static SofaRpcRuntimeException buildRuntime(String configKey, String configValue) { String msg = "The value of config " + configKey + " [" + configValue + "] is illegal, please check it"; return new SofaRpcRuntimeException(msg); }  static SofaRpcRuntimeException buildRuntime(String configKey, String configValue); static SofaRpcRuntimeException buildRuntime(String configKey, String configValue, String message); static boolean isServerException(SofaRpcException exception); static boolean isClientException(SofaRpcException exception); static String toString(Throwable e); static String toShortString(Throwable e, int stackLevel);  }
@Test public void buildRuntime() throws Exception { SofaRpcRuntimeException exception = ExceptionUtils.buildRuntime("xxx111", "222"); Assert.assertTrue(exception.getMessage().contains("xxx111")); Assert.assertTrue(exception.getMessage().contains("222")); }
@Test public void buildRuntime1() throws Exception { SofaRpcRuntimeException exception = ExceptionUtils.buildRuntime("xxx111", "222", "yyy"); Assert.assertTrue(exception.getMessage().contains("xxx111")); Assert.assertTrue(exception.getMessage().contains("222")); Assert.assertTrue(exception.getMessage().contains("yyy")); }