Class JKValidationException

All Implemented Interfaces:
JKNonPrintableException, Serializable

public class JKValidationException extends JKException implements JKNonPrintableException
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 Details

    • JKValidationException

      public JKValidationException()
      This method constructs a new JKValidationException 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 a JKValidationException 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

      public JKValidationException(String message, Throwable cause)
      This method constructs a JKValidationException 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

      public JKValidationException(String message)
      This method constructs a JKValidationException with a specific error message.
      Parameters:
      message - Specifies the error message explaining the reason for the validation issue.
    • JKValidationException

      public JKValidationException(Throwable cause)
      This method constructs a JKValidationException with a cause.
      Parameters:
      cause - Specifies the cause of this exception.
    • JKValidationException

      public JKValidationException(Problems problems)
      This method constructs a JKValidationException with a specific problem.
      Parameters:
      problems - Specifies the problems associated with this exception.
    • JKValidationException

      public JKValidationException(String message, Object comp)
      This method constructs a JKValidationException 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

      public JKValidationException(Object comp, Problem problem)
      This method constructs a JKValidationException 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

      public Object getComponent()
      This method gets the object or component that failed the validation process.
      Returns:
      the object or component that failed the validation process.
    • getProblems

      public Problems getProblems()
      This method gets the problem associated with the exception.
      Returns:
      the problem associated with the exception.