Class InvalidInputException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.ntu.fdae.group1.bto.exceptions.InvalidInputException
- All Implemented Interfaces:
Serializable
Exception thrown when user input validation fails.
This exception indicates that input provided by a user or passed between system components fails validation criteria. Common validation issues include: - Missing required fields - Values outside of acceptable ranges - Malformed data (e.g., improperly formatted NRIC) - Logically inconsistent combinations of values
InvalidInputException helps separate input validation concerns from business logic exceptions, allowing the UI layer to handle and display validation errors appropriately.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidInputException
(String message) Constructs a new InvalidInputException with a detailed message.InvalidInputException
(String message, Throwable cause) Constructs a new InvalidInputException with a detailed message and cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidInputException
Constructs a new InvalidInputException with a detailed message.- Parameters:
message
- The detail message explaining the validation error
-
InvalidInputException
Constructs a new InvalidInputException with a detailed message and cause.- Parameters:
message
- The detail message explaining the validation errorcause
- The underlying cause of this exception
-