Open kennethSty opened 1 week ago
No details provided by team.
[The team marked this bug as a duplicate of the following bug]
Entries added although FileToWrite to is not found
Although several exceptions are encountered when adding new entries, the entries are still added into some object that cannot be the file (as it is not found).
[original: nus-cs2113-AY2425S1/pe-interim#472] [original labels: severity.Low type.FunctionalityBug]
[This is the team's response to the above 'original' bug]
The issue highlighted affects the specific edge case that involves the manual removal of the data file. The program does not crash and the user can recover the program functionality by restarting application which would recreate the necessary data file automatically. That was our way of successfully handling this edge case.
We feel the issue lies within what is displayed on screen to the user. We admit that printing the exception to screen is not a very user friendly way of letting the user know the error.
However, the record is shown to be added successfully is technically true because it has indeed added the record to the Inventory successfully which is currently on non persistent memory but it just has not saved this Inventory state to the csv file. As shown above, you can still view -a the non persistent inventory.
We feel the error has been handled but not clearly conveyed to the user so the fix would be to show "CSV data file not found, please restart the application and run command again" to the user.
We would also like to classify #456 and #749 as duplicate issues of this as they are referring to the exact same thing.
Items for the Tester to Verify
:question: Issue duplicate status
Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)
Reason for disagreement: Thank you for your response :)!
Unfortunately, I have a slightly different view than the one you stated.
While both issues stem from the same root cause—the missing data directory—I view them as distinct manifestations of the underlying implementation problem.
There is a clear distinction between the two scenarios:
In the issue "Entries added although FileToWrite is not found", new entries were added to the existing table.
In my reported issue, a new table with new headers was created instead.
These represent two different downstream tasks where the FileNotFoundException
is not being handled appropriately. While this behaviour may arise from the same missing code logic, it does not necessarily mean the issues are identical.
For example, handling the FileNotFoundException
might already be incorporated in the table creation process but missing in the command that adds new entries. The fact that this exception isn’t properly handled in both commands suggests a broader issue. Given this background, I believe these distinct symptoms deserve separate consideration to address the problem comprehensively.
Reproducing:
add -h s/name, i/quantity, f/price, d/expiry
Results in a FileNotFound exception.