try {
r();
} catch (Exception e) {
System.out.println(e.getMessage());////==null.....!!
}public static void r(){
System.out.println("run...");
try {
System.out.println("try...");
throw new RuntimeException("msg");
} catch (Exception e) {
System.out.println(e.getMessage());
throw new RuntimeException(e);
}
}e.getMessage()==null!!!
为什么会这样
用线程访问网络,然后异常
我把异常信息RuntimeException runEx = new RuntimeException(exMsg, e);抛出调用的方法再接住
打印异常信息就为null