hackelite01 / hacktoberfest-2024

11 stars 79 forks source link

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

Closed pulkitbajaj closed 1 month ago

pulkitbajaj commented 1 month 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 1 month ago

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