![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Using the Catch/Propagate Exception Dialog BoxThe Debug > Catch, Debug > Propagate, and Exceptions > New commands use the Catch/Propagate Exception dialog box.
Exception Field
In the Exception field, enter the exception name.
Location Field
The Location field is at the top of the this dialog box. Selecting this field displays two options: On Line and On Location.
- On Line
To catch/propagate an exception on a specific line in a file, select On Line then enter the line number. Then, In the File field, enter a debugger pathname denoting a program unit.
- On Location
If you wish to catch/propagate an exception at a subprogram, task or package, enter the name of a subprogram, task or package. If the subprogram name given is a simple identifier, all subprograms, tasks, and packages (with an elaboration subprogram) in the program are visible.
The subprogram can also be given as an expanded name . The leftmost simple name of an expanded name must be directly visible from the current context or must be the name of a library unit.
If On Location is selected, the File: input box disappears as it is no longer relevant.
File Name
If On Line is selected, you must enter a debugger pathname denoting a program unit in this field.
Statements
The entry in this section can take several forms. It can be an expression that is evaluated each time the breakpoint is reached. This evaluation takes place in the environment of the location of the exception breakpoint. If the expression is False, the exception is propagated and the program continues. If the expression is True, the breakpoint is announced.
The Statements area can also contain a sequence of one or more debugger commands that automatically execute when the exception occurs. The following format is used:
begin commands end
Note that you do not need to enter begin or end statements. You can enter the command on the same line separated by semicolons or enter each command on its own line. The second method (separate lines) is recommended. As each command of commands is entered on its own line, the debugger prompts with ?? for each new command until the sequence terminates with end (or an else in the case of an if...then...else).
Conditional
If the catching/propagation of the exception is to be determined by a set of conditions, select this button. A new screen appears with areas to enter the conditions under which this request is to operate.
Action
The Action field indicates the operation to perform. Select Catch to catch the exception and cause the debugger to stop execution. Select Propagate to have the debugger ignore this exception without stopping execution. The default is based on the command that displayed this dialog box.
For more information on exceptions, see Using the Apex Debugger.
Additional Topics
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |