/**
     * Return whether the given throwable is a checked exception:
     * that is, neither a RuntimeException nor an Error.
     * @param ex the throwable to check
     * @return whether the throwable is a checked exception
     * @see java.lang.Exception
     * @see java.lang.RuntimeException
     * @see java.lang.Error
     */
    public static boolean isCheckedException(Throwable ex) {
        return !(ex instanceof RuntimeException || ex instanceof Error);
    }

 

相关文章:

  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2022-02-19
  • 2021-12-17
  • 2021-10-05
  • 2021-07-30
  • 2022-01-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2018-02-24
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
相关资源
相似解决方案