# Adding an Exception

Using the Exceptions window, you can instruct the debugger to handle exceptions generated in your code. An exception is a signal that indicates some type of condition has occurred.

To add an exception to the list:

1. Open the Exceptions window by choosing Debug -> Exceptions.
2. Type the class name of the exception in the Exception box.
   For example, `java.lang.ThreadDeath` is thrown when the thread terminates.
3. Click Add.
   JDE inserts the exception into the scrolling list.

JDE supports three types of exception settings.

Break on Uncaught
  This setting is the default. The debugger intercepts the exception only if there is no corresponding catch block.

Break Always
  If you set an exception to Break Always, the exception is treated like a breakpoint even if you have recovery code in your program.

Ignore
  If you set an exception to Ignore, then the debugger does not intervene; you will get the same behavior as you would if you were running the program without the debugger.

You can change an exception's setting by selecting the exception and then clicking the button of the desired setting.

See also:

  Using the Exceptions Window