![]() Previous |
![]() Next |
Templates are user-defined collections of exceptions you want counted during ru ntime. By using templates, the same exceptions are counted during execution of your application, ensuring consistency and accuracy of the count results.
To create a template:
In the Templates panel, click Add.
The Add Template dialog box appears.
Enter a name for your template (for example, My Template) and click OK.
The new template appears on the Templates list (Figure: New Template Added).
To rename a template:
Select the template you want to rename.
Click Edit.
The Edit Template dialog box appears.
Click OK.
The renamed template appears on the Templates list.
To delete a template:
Select the template you want to delete.
Click Delete.
To add exceptions to the template
In the Template panel, select the template to which you want to add exceptions.
The title of the template list changes to match the name of the highlighted template.
|
Note: If the template name is too long, the list name will be truncated. |
In the Exception List panel, click Add.
The Add new exception to profile dialog box appears.
Enter the name of the exception class you want to use (for example, java.lang.Exception).
If you want to include all subclasses to the specified exception class in the exception count profile, select Include subclasses in the exception count.
Click OK.
The dialog box closes and the new exception class appears in the exception list (Figure: Exception List).
Select the plus sign (+) next to the class name to expand the list and see all the subclasses for the selected class.
Select the checkbox next to each subclass that you want to profile.
The selected exceptions will be profiled when exception profiling is started, as described in "Profiling Exceptions".
To edit exceptions:
Editing an exception allows you to enable or disable profiling of subclasses. The check box in the tree enables or disables the actual profiling. In the dialog box, you can specify whether or not classes derived from that exception class should be included in the count.
Highlight the exception you want to edit.
Click Edit.
The Edit <exception.name> dialog box appears.
Do one of the following:
To include classes derived from the exception, select the check box.
If classes are already included and you want to exclude them, deselect the check box.
Click OK.
To remove exceptions from the template:
Select the exception class or subclass you want to delete.
Click Delete.