Exception Handling

Note:

exception handling is used to deal with errors.​

throw statement can be used to give an error exception.​

try…catch statement can be used to process code and handle exceptions.​

retry can be written in a catch block to jump back to the first line of code within the try block.​

finally clause can be added to a try…catch statement to execute statements when the try block exits.