Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Java Development User Guide
Previous Page Home Next Page

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 presented (see the following figure).

    Add Exception Breakpoint Dialog

  3. 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 and caught by a catch clause.
    • 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.

Related concepts
Java development tools (JDT)
Breakpoints

Related tasks

Creating Exception Breakpoint Filters
Suspending threads
Adding breakpoints
Removing breakpoints
Enabling and disabling breakpoints
Setting method breakpoints

Related reference
Breakpoints view
Add Java exception breakpoint

 


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire