Skip to content

v0.2

Latest

Choose a tag to compare

@yixianggg yixianggg released this 15 Sep 13:06
Add exception handling and assertions to task addition methods

The addToDo method did not handle invalid input properly and lacked
internal consistency checks.

To improve error handling and ensure the integrity of task addition
operations.

Added validation to ensure the to-do description is not empty and
throws a ChatBotException for invalid inputs. Incorporated assertions
to check that the task list size increases correctly after adding a new
task. Similar changes were made to the addDeadline, addEvent, and
addFixed methods to include assertions and improve robustness.

These updates ensure that invalid inputs are properly managed and
internal consistency is maintained across task addition operations.