lixupengg / pe

0 stars 0 forks source link

Wrong error message for add-d #7

Open lixupengg opened 4 years ago

lixupengg commented 4 years ago

image.png

Wrong error message being thrown. Error raised should be invalid expense index (which is thrown when you add-d 500 d/boohoo), but the error raised now even though index is still invalid is wrong command format.

nus-pe-bot commented 4 years ago

Team's Response

Looking at the UG or the error message more carefully, the first error message is like that because it is specified that a valid delete-d command should have the index being a positive integer. image.png SInce 0 is not a positive integer, "delete-d 0" is an invalid command, so an error is thrown stating the command is invalid.

Only when the command is valid (index is positive), then we proceed to look at whether the user gave a index that is too large. Only if the command is already valid, we give the error specific to index instead of an invalid command error.

Thanks for pointing out!

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: This error was raised as the wrong error message is being thrown for "add-d" command, but the justification is talking about the "delete-d" command. Thus, no reason was cited as to why this error should be rejected.