Skip to content

Commit

Permalink
Merge pull request #319 from Atulteja/master
Browse files Browse the repository at this point in the history
made changes to exceptions
  • Loading branch information
TVageesan authored Nov 12, 2024
2 parents d1da3f5 + b76319a commit 56d1602
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/common/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static String formatDate(LocalDate date){
}

public static void validate(int integer) {
if (integer < 0){
if (integer <= 0){
throw ParserException.invalidInt(integer);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/exceptions/ParserException.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static ParserException invalidInt(int no) {
* @return A {@code ParserExceptions} with a message indicating that the provided date is invalid.
*/
public static ParserException invalidDate(String date) {
return new ParserException("Invalid Date: " + date + ",Provide Date in format dd-MM-yyyy.");
return new ParserException("Invalid Date: " + date + ", Provide Date in format dd-MM-yyyy.");
}

/**
Expand Down

0 comments on commit 56d1602

Please sign in to comment.