Forums Assignment Help Why is it a bad idea to throw your own exceptions

This topic contains 1 reply, has 1 voice, and was last updated by  Aakanksha 6 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4015

    Aakanksha
    Participant

    Why is it a bad idea to throw your own exceptions?

    #11591

    Aakanksha
    Participant

    If at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.