• 周日. 12月 10th, 2023

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

java异常处理

admin

11月 28, 2021
  • 必须捕获与非必须捕获异常。 用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);
        }

— 她说, 她是仙,她不是神

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注