处理断言错误

来源:互联网 发布:二次元直播软件 编辑:程序博客网 时间:2024/05/03 21:00

 public class Main {
  public static void main(String[] argvthrows Exception {
    try {
      assert argv.length > 0;
    catch (AssertionError e) {
      String message = e.getMessage();
      System.out.println(message);
    }
  }
}

原创粉丝点击