Respuesta :
To handle exceptions, first you code a/an try block around any php statements that might throw an exception.
Try blocks are used in Java to include code that might raise an exception. It has to be applied to the technique. The try block's remaining statements won't run if an exception arises at that specific statement. Therefore, it is advised against keeping code in a try block that won't throw an exception.
Try blocks are designed to let you attempt an action and, in the event that an exception arises, catch it and handle it graciously rather than crashing. Try blocks enable a program to gracefully handle an exception in the manner desired by the programmer. Using try/catch blocks, for instance, will enable a program to print an error message.
To know more about Try blocks refer to: https://brainly.com/question/14186450
#SPJ4