hackelite01 / hacktoberfest-2024

14 stars 83 forks source link

Improved removeTask method with input validation and specific excepti… #53

Closed pulkitbajaj closed 4 days ago

pulkitbajaj commented 1 week ago

This pull request improves the removeTask method by adding input validation to ensure the task number is within the valid range. It also catches a specific IndexOutOfBoundsException instead of a general Exception, making the code more robust and easier to debug.

Changes:

These changes enhance the overall user experience and prevent potential errors when removing tasks from the to-do list.

hackelite01 commented 4 days ago

For creating a PR for hacktoberfest, kindly visit https://github.com/hackelite01/hacktoberfest2024.