nus-cs2113-AY2425S1 / pe-dev-response

0 stars 0 forks source link

Delete items for invalid range #292

Open nus-pe-bot opened 1 week ago

nus-pe-bot commented 1 week ago

To reproduce:

  1. add an expense and an income
  2. run delete 2 /to 5

Result is an error message since there are no items 3, 4, 5 but there is an item 2. Should it be deleted ? Consider having many items and wanting to delete last 10.


[original: nus-cs2113-AY2425S1/pe-interim#489] [original labels: type.FunctionalityBug severity.VeryLow]

Littleme1032 commented 1 week ago

Team's Response

The delete /to command is designed to work only with valid ranges where all specified indices exist. If part of the range is invalid, the command is intentionally set to fail to avoid partial deletions or unpredictable behavior. While this is the intended design, we acknowledge that handling partial ranges could be considered as a future improvement. However, this behavior is not within the scope of the current implementation.

Duplicate status (if any):

--