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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidofIllegalArgumentException(String message) Throw aCommonIllegalArgumentExceptionwith the given message.voidofIllegalArgumentException(String message, Exception e) Throw aCommonIllegalArgumentExceptionwith the given message and cause.voidofNullPointerException(String message) Throw aNullPointerExceptionwith the given message.voidofRuntimeException(String message) Throw aCommonRuntimeExceptionwith the given message.voidThrow aCommonRuntimeExceptionwrapping the given throwable.
-
Constructor Details
-
ThrowKit
public ThrowKit()
-
-
Method Details
-
ofIllegalArgumentException
Throw aCommonIllegalArgumentExceptionwith the given message.- Parameters:
message- the detail message- Throws:
CommonIllegalArgumentException- always
-
ofIllegalArgumentException
public 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
-