Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception messages displaying wrong information #207

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}
}
Loading