# Catching Java exceptions

It is possible to suspend the execution of thread when an exception is thrown by specifying an exception breakpoint. Execution can be suspended at locations where the exception is uncaught, caught, or both.

1. Choose Add Java Exception Breakpoint from the Breakpoints view or the workbench Run menu.
2. A dialog listing all of the available exceptions is shown.
3. Either type the name of the exception you want to catch or select it from the list.
4. At the bottom of the page, use the checkboxes to specify how you want execution to suspend at locations where the exception is thrown.
   - Select Caught if you want execution to suspend at locations where the exception is thrown but caught.
   - Select Uncaught if you want execution to suspend at locations where the exception is uncaught.

Note: Exception breakpoints can be enabled and disabled and have hit counts just like regular breakpoints.

Java development tools (JDT)
Breakpoints

Suspending threads
Adding breakpoints
Removing breakpoints
Enabling and disabling breakpoints
Setting method breakpoints

Breakpoints view