Package com.jk.core.exceptions
Class JKValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.jk.core.exceptions.JKException
com.jk.core.exceptions.JKValidationException
- All Implemented Interfaces:
JKNonPrintableException
,Serializable
This class represents exception thrown to indicate validation errors within
the application.
This exception is a subclass of JKException
and implements
JKNonPrintableException
This class should be used to represent situations where data access data validation fails or input does not meet the required criteria.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionThis method constructs a newJKValidationException
without any specified errors or causes.JKValidationException
(Problems problems) This method constructs aJKValidationException
with a specific problem.JKValidationException
(Object comp, Problem problem) This method constructs aJKValidationException
with a specific component and a specification of the related problem.JKValidationException
(String message) This method constructs aJKValidationException
with a specific error message.JKValidationException
(String message, Object comp) This method constructs aJKValidationException
with a specific error message and component.JKValidationException
(String message, Throwable cause) This method constructs aJKValidationException
with a specific error message and a cause.JKValidationException
(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) This method constructs aJKValidationException
with a specific error message, cause, suppression behavior, and stack trace writability.JKValidationException
(Throwable cause) This method constructs aJKValidationException
with a cause. -
Method Summary
Modifier and TypeMethodDescriptionThis method gets the object or component that failed the validation process.This method gets the problem associated with the exception.Methods inherited from class com.jk.core.exceptions.JKException
isLogged, setLogged
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
JKValidationException
public JKValidationException()This method constructs a newJKValidationException
without any specified errors or causes.This constructor is typically used when the exception is thrown to represent a specific error condition without additional details.
-
JKValidationException
public JKValidationException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) This method constructs aJKValidationException
with a specific error message, cause, suppression behavior, and stack trace writability.- Parameters:
message
- Specifies the error message explaining the validation issue.cause
- Specifies the cause of this exception.enableSuppression
- Specifies whether suppression is enabled or disabled.writableStackTrace
- Specifies whether the stack trace should be writable.
-
JKValidationException
This method constructs aJKValidationException
with a specific error message and a cause.- Parameters:
message
- Specifies the error message explaining the reason for the validation issue.cause
- Specifies the cause of this exception.
-
JKValidationException
This method constructs aJKValidationException
with a specific error message.- Parameters:
message
- Specifies the error message explaining the reason for the validation issue.
-
JKValidationException
This method constructs aJKValidationException
with a cause.- Parameters:
cause
- Specifies the cause of this exception.
-
JKValidationException
This method constructs aJKValidationException
with a specific problem.- Parameters:
problems
- Specifies the problems associated with this exception.
-
JKValidationException
This method constructs aJKValidationException
with a specific error message and component.- Parameters:
message
- Specifies the error message explaining the reason for the validation issue.comp
- Specifies the object or component that failed the validation process.
-
JKValidationException
This method constructs aJKValidationException
with a specific component and a specification of the related problem.- Parameters:
comp
- Specifies the object or component that failed the validation process.problem
- Specifies the problem associated with the exception.
-
-
Method Details
-
getComponent
This method gets the object or component that failed the validation process.- Returns:
- the object or component that failed the validation process.
-
getProblems
This method gets the problem associated with the exception.- Returns:
- the problem associated with the exception.
-