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

Error not suitable for delete command #2961

Open
nus-se-bot opened this issue Nov 12, 2021 · 1 comment
Open

Error not suitable for delete command #2961

nus-se-bot opened this issue Nov 12, 2021 · 1 comment

Comments

@nus-se-bot
Copy link

nus-se-bot commented Nov 12, 2021

image.png

When the user types 'delete -11111' , the user would get the error message that an instrument does not exist at that index when in reality the index itself is invalid. Needs a more appropriate error message.


[original: nus-cs2113-AY2122S1/pe-interim#2953] [original labels: severity.Medium type.FunctionalityBug]
@KVignesh122
Copy link
Contributor

KVignesh122 commented Nov 14, 2021

Team's Response

We agree that in Java all index numbers of ArrayLists and Arrays must be non-negative. Since we had used an ArrayList to store the added instruments in the program, -1111 should be an invalid index instead of being treated as a legitimate index with no element at that index, like it is portrayed in the error message. So, the reported bug is accepted.

However, the severity is downgraded to Low since the bug only has to do with phrasing of the error message but the feature works as expected.

Duplicate status (if any):

--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants