Skip to content

Commit

Permalink
Fix exception messages for logAdd command
Browse files Browse the repository at this point in the history
  • Loading branch information
CJerrong committed Apr 15, 2024
1 parent ead3de5 commit c43efe3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class LogAddCommand extends Command {
+ PREFIX_REMARKS + "was a good session ";

public static final String MESSAGE_SUCCESS = "New log added!";
public static final String MESSAGE_NEGATIVE_DURATION = "Duration cannot be negative.";
public static final String MESSAGE_NEGATIVE_DURATION = "Duration must be positive.";
public static final String MESSAGE_PERSONS_NOT_PAIRED = "The volunteer and befriendee are not paired.";

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/scrolls/elder/logic/parser/ParserUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static Integer parseInt(String num) throws ParseException {
try {
return Integer.parseInt(trimmedNum);
} catch (NumberFormatException e) {
throw new ParseException("Invalid number format. Expected a number.", e);
throw new ParseException("Invalid number format. Expected an integer.", e);
}
}
}

0 comments on commit c43efe3

Please sign in to comment.