Skip to content

Commit c43efe3

Browse files
committed
Fix exception messages for logAdd command
1 parent ead3de5 commit c43efe3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/scrolls/elder/logic/commands/LogAddCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class LogAddCommand extends Command {
4949
+ PREFIX_REMARKS + "was a good session ";
5050

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

5555
/**

src/main/java/scrolls/elder/logic/parser/ParserUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public static Integer parseInt(String num) throws ParseException {
173173
try {
174174
return Integer.parseInt(trimmedNum);
175175
} catch (NumberFormatException e) {
176-
throw new ParseException("Invalid number format. Expected a number.", e);
176+
throw new ParseException("Invalid number format. Expected an integer.", e);
177177
}
178178
}
179179
}

0 commit comments

Comments
 (0)