DefaultRuntimeException
支持 {} 占位符,
{} 占位符,throw new DefaultRuntimeException("dataName:[{}],keys:[{}] can't be null/empty!", dataName, beans.keySet());示例1:
public void testRuntimeException(){
try{
int i = 1 / 0;
}catch (Exception e){
throw new RuntimeException("", e);
}
}
java.lang.RuntimeException:
at com.feilong.core.DefaultRuntimeExceptionTest.testRuntimeException(DefaultRuntimeExceptionTest.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.lang.reflect.Method.invoke(Method.java:606)
Caused by: java.lang.ArithmeticException: / by zero
at com.feilong.core.DefaultRuntimeExceptionTest.testRuntimeException(DefaultRuntimeExceptionTest.java:61)
... 23 more示例2:
最后更新于
这有帮助吗?
