Exception Handling

The Distributed Debugger allows you to investigate exceptions that occur while you are debugging your program.

You can choose the types of exception or the level of exception you want the debugger to recognize in the Exception Filter Preferences Setting field in Applications Preferences dialog box. The types of exception or level of exception you can select varies with the platform where you are running the program that you are debugging. For example, the exceptions the debugger can handle for a C++ program running on Windows NT are different from the exceptions the debugger can handle for a C++ program running on AIX.

When the debugger encounters an exception that matches one of the exceptions that are specified in the Exception Filter Preferences Settings dialog box, a dialog box opens to warn you an exception occurred. Also, the line where the exception occurred is highlighted in the Source pane.

After a program exception is encountered and the Application Exception Occurred dialog box is closed, the following actions are available:

Step exception
Step exception causes the debugger to step into the first registered exception handler (tracked by the operating system). Execution stops at the first executable line of code in the exception handler. If your application does not have a registered exception handler, the exception remains "unhandled" and the application may be terminated.

ngjava.gif (312 bytes) When debugging interpreted Java programs, exceptions are handled through a try/catch/finally mechanism. Selecting Step Exception causes the debugger to step into the first catch clause that handles the exception that was thrown. Execution stops at the first executable line of code in the catch block. If the exception is not caught by your application, the exception remains "unhandled" and the application may be terminated.

Run exception
Run exception causes the debugger to run the exception handler that is registered to handle the type of exception encountered. If your application does not have a registered exception handler, the exception remains "unhandled," and the application may be terminated.

ngjava.gif (312 bytes) When debugging interpreted Java, selecting this action causes the debugger to run the catch block that handles the type of exception encountered. If your application does not have a corresponding catch block, the exception remains "unhandled," and the application may be terminated.

Examine/Retry exception

ngjava.gif (312 bytes) Examine/retry exceptions are not supported when debugging interpreted Java programs.

Examine/Retry exception discards the exception and allows you to investigate the cause of the exception and, if desired, retry program execution at the statement that triggered the exception. The debugger begins at this statement and attempts to continue.