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

--- 她说, 她是仙,她不是神
原文地址:https://www.cnblogs.com/bregman/p/15136784.html