In: Computer Science
Why use exception handlers? Why not include logic in the program to ensure exceptions do not occur? Are there types of exceptions for which this approach would be suitable?
Exception handlers can be used to not interput the normal flow by the some of the specialized errors to be occured. This will used for error handling, error detection.
Dynamic approach type of coding will suitable for this more ever this handlers can use at any where.
These exceptions may be arithmetic e.t.c., which were not knowingly and also these are much important to see by stoping the development of our process, so we wirte an exception handlers with the help of try and catch blocks to normal flow.