Class ExceptionHandler

java.lang.Object
me.axolotl.api.tool.ExceptionHandler

public final class ExceptionHandler extends Object
ExceptionHandler類別提供了處理異常的實用方法。
Since:
2024-02-08
  • Constructor Details

    • ExceptionHandler

      public ExceptionHandler()
  • Method Details

    • handleException

      @Deprecated(since="2024-02-13") public static void handleException(Runnable function, Consumer<Throwable> errorHandler)
      Deprecated.
      自2024-02-13起
      執行指定的函數並使用提供的錯誤處理程序處理任何異常。
      Parameters:
      function - 要執行的函數。
      errorHandler - 用於處理異常的處理器。
    • ExceptionLevel

      public static ExceptionHandler.ExceptionLevel ExceptionLevel(Throwable throwable)
      確定異常的級別。
      Parameters:
      throwable - 要分析的異常。
      Returns:
      異常級別。