Class ThrowKit
java.lang.Object
com.iohao.net.common.kit.exception.ThrowKit
Exception throwing utilities for internal use.
- Since:
- 21.14
- Author:
- 渔民小镇
- date:
- 2024-08-01
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidofIllegalArgumentException(String message) Throw aCommonIllegalArgumentExceptionwith the given message.static voidofIllegalArgumentException(String message, Exception e) Throw aCommonIllegalArgumentExceptionwith the given message and cause.static voidofNullPointerException(String message) Throw aNullPointerExceptionwith the given message.static voidofRuntimeException(String message) Throw aCommonRuntimeExceptionwith the given message.static voidThrow aCommonRuntimeExceptionwrapping the given throwable.
-
Method Details
-
ofIllegalArgumentException
Throw aCommonIllegalArgumentExceptionwith the given message.- Parameters:
message- the detail message- Throws:
CommonIllegalArgumentException- always
-
ofIllegalArgumentException
public static void ofIllegalArgumentException(String message, Exception e) throws CommonIllegalArgumentException Throw aCommonIllegalArgumentExceptionwith the given message and cause.- Parameters:
message- the detail messagee- the cause- Throws:
CommonIllegalArgumentException- always
-
ofRuntimeException
Throw aCommonRuntimeExceptionwith the given message.- Parameters:
message- the detail message- Throws:
CommonRuntimeException- always
-
ofRuntimeException
Throw aCommonRuntimeExceptionwrapping the given throwable.- Parameters:
e- the throwable to wrap- Throws:
CommonRuntimeException- always
-
ofNullPointerException
Throw aNullPointerExceptionwith the given message.- Parameters:
message- the detail message- Throws:
NullPointerException- always
-