forked from nus-cs2103-AY2526S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
For each index-based command, try a negative index and an out-of-range positive index:
- delete-contact -1
- delete-contact 99
- edit-contact -1
- edit-contact 99
- delete-member -1
- delete-member 99
Expected:
Any invalid index (negative or out-of-bounds) should produce a consistent, index-related error message.
Actual (examples):
delete-contact -1→ “Invalid command format”delete-contact 99→ “The contact index provided is out of range”edit-contact -1→ “Invalid command format!”edit-contact 99→ “At least one field to edit must be provided.”delete-member -1→ “Invalid command format!”delete-member 99→ “Invalid command format!”
Why this is a problem:
Users making the same mistake (invalid index) receive different categories of errors across commands and even within the same command, which is confusing and slows recovery.
Suggested Improvements:
-
Standardize invalid-index handling across all index-based commands so both negative and out-of-range indices always yield the same index-related error message.
-
Ensure index validity is checked first, so unrelated messages (e.g., “At least one field to edit must be provided.”) don’t mask the index error.
Labels: severity.Low type.FunctionalityBug
Reactions are currently unavailable





