In: Computer Science
How does try/catch(exception) processing help resolve run time exceptions?
What is a custom exception? What are it's benefits?
What does it mean when we raise a custom exception?
With the help of try/catch processing, we can avoid abrupt termination of the program. With catch block, we can do custom handling for each type of exception.
A custom exception is a user-created exception. Some of its benefits are:
When we raise a custom exception, it means that we expect the code to throw this exception.