Package me.axolotl.api.tool
Class ExceptionHandler
java.lang.Object
me.axolotl.api.tool.ExceptionHandler
ExceptionHandler類別提供了處理異常的實用方法。
- Since:
- 2024-02-08
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExceptionLevel(Throwable throwable) 確定異常的級別。static voidhandleException(Runnable function, Consumer<Throwable> errorHandler) Deprecated.自2024-02-13起
-
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
確定異常的級別。- Parameters:
throwable- 要分析的異常。- Returns:
- 異常級別。
-