java异常处理
- 必须捕获与非必须捕获异常。 用RuntimeException 抛出提示
try {
// todo
} catch (Exception e) {
String message = String.format("record=%s,keys=%s",checkPoints, args[1]);
// System.err.println(message);
// e.printStackTrace();
throw new RuntimeException(message, e);
}
--- 她说, 她是仙,她不是神

浙公网安备 33010602011771号