nus-cs2113-AY2324S2 / pe-dev-response

0 stars 0 forks source link

Unable to handle corrupt saved_topics.txt file #2449

Open nus-pe-bot opened 2 months ago

nus-pe-bot commented 2 months ago

When saved_topics.txt is manually edited or corrupted via other reasons. The program should probably either clear the starred list or only load legal topic names. But currently the program loads the topic no matter what.

Example:

Hello from
__________________________________________________________________________________________
    _     _                           __             ______                     __
    /|   /                          /    )             /      /               /    )
---/-| -/-----__----------__-------/----/----__-------/------/__----__-------/---------__-
  /  | /    /___)| /| /  (_ `     /    /   /   )     /      /   ) /___)     /  --,   /   )
_/___|/____(___ _|/_|/__(__)_____(____/___/___/_____/______/___/_(___ _____(____/___(___/_

What is your name?
Maodian huang
____________________________________________________________

Hello Maodian huang
____________________________________________________________

What do you want from me?
____________________________________________________________

starred
____________________________________________________________

Here is the list of your favourite topics:
     - Entertainment
     - Technol
     - Sportssadasd
____________________________________________________________

What do you want from me?
____________________________________________________________

suggest
____________________________________________________________

1. Suggesting an article from your favorite topic: Entertainment
    Title: The Matrix has a fifth film in the works and no this is not a simulation  CNN
URL: https://edition.cnn.com/2024/04/03/entertainment/matrix-fifth-movie/index.html
No articles found for the topic: Technol
No articles found for the topic: Sportssadasd

____________________________________________________________

What do you want from me?
____________________________________________________________

[original: nus-cs2113-AY2324S2/pe-interim#2371] [original labels: severity.Low type.FunctionalityBug]

anneleong commented 2 months ago

Team's Response

i think it shows that the corrupted file is still handled quite gracefully whereby topics are still read and the system still runs without crashing.

Duplicate status (if any):

--