Glossaria.net

Glossary Java / Term

exception handler

A block of code that reacts to a specific type of exception. If the exception is for an error that the program can recover from, the program can resume executing after the exception handler has executed.

The try/catch/finally statement is Java's exception handling mechanism. try establishes a block of code that is to have its exceptions and abnormal exits (through break, continue, return, or exception propagation) handled. The try block is followed by zero or more catch clauses that catch and handle specified types of exceptions. The catch clauses are optionally followed by a finally block that contains clean-up code. The statements of a finally block are guaranteed to be executed, regardless of how the code in the try block exits.

Permanent link exception handler - Creation date 2022-01-03


< exception Glossary / Java executable content >