The exception handler (catch block) is a construction in a programming language that immediately follows the try block. It is used to handle exceptions that occur within the try block.
When an exception occurs, control transfers to the exception handler (catch block) following the try block.
The exception handler can print an error message, continue processing at that point, transfer control elsewhere, or terminate the program.
The try-throw-catch arrangement simplifies coding as it automatically handles exceptions, allowing for cleaner code and eliminating the need to check return values for each statement.