Open GanapathySanathBalaji opened 4 years ago
This is not a bug, but an intended feature.
In fact, for v1, the project supervisor (TA) suggested a few ways to handle corrupted files. One of the ways was to report and wipe the file and allow the user to continue using the program.
Team chose [response.Rejected
]
Reason for disagreement: Isn't this still a bug?
Let's say a hospital has 1000 patient records but an admin unknowingly enters a command similar to the one mentioned. This compromises the data of the other 999 patients too. If instead an exception was thrown in the edit statement itself instead of updating it successfully, the data of the other patients can still be protected instead of being compromised.
The command used to edit the patient details is as follows:
editp \index 1 \name Henry \address |Clem | enti \phone 83487846
One wrong edit command causes the whole file to be corrupted.
If the issue was found, the whole data file doesn't need to be compromised.