Skip to main content
Windward

Using Error Handling and Verify

Overview

Together, Verify and Error Handling provide the user with a list of template and tag issues. Error Handling also enables the report to run past exceptions that would normally halt report generation.

Error Handling Issues

Five different Error Handling options can be set on individual tags. Type Issues, Formatting Issues and Bad Selects catch a variety of exceptions that would normally halt report generation. Node Does Not Exist and Node Is Null verify the existence of a node or its contents. Error Handling is limited to the following tag types: Out, Import, Set, ForEach, Query, If, Switch, Case, Link, and Bookmark.

Type Issues

Occurs when a tag's defined data type is different than the data type of the data returned by the select statement. These issues normally throw an exception halting report generation.

Formatting Issues

Occurs when a tag's specified format is not compatible with the format of the data returned by the select. These issues would normally throw an exception that halts report generation.

Bad Selects

Occurs when a select fails to find valid data in the data source. This occurs for several reasons, for example referencing a nonexistent column alias used in a select statement. These issues would normally throw an exception that halts report generation.

Node Does Not Exist

Occurs when a node is queried and does not exist in the targeted data source. These issues would normally return an empty value that may be output to the final report without an explanation for why the data is absent.

Node Is Null

Occurs when a select returns an empty or NULL value. These issues would normally return an empty value that may be output to the final report without an explanation for why the data is absent.

Verification Issues

Verification issues are reported by Verify. Verification issues need not be enabled for individual tags. Verification issue types are listed below:

Unused Data Source

Occurs when a data source is connected to the template but not used.

Undefined Data Source

Occurs when a tag uses a data source that is either not currently connected or a data source is not defined in the tag.

Elements generating off page

Occurs when an element is generated off the visible page.

Invisible Tags

Tags can become invisible during editing.  This can occur when deleting a tag using the backspace key.  The recommended method is to use the delete tag option in the AutoTag ribbon. In this scenario, no visible text representation of the tag is shown in the template.  However, the underlying field code still exists in the template (click ALT+F9 to reveal all tag field codes) and will therefor still output during report generation. Verify reports any invisible tags in the template.

Adding Error Handling to Your Template

Step 1

In a AutoTag template, open the Tag Editor for the tag in which to add Error Handling by double clicking the tag. 

Step 2

In the Tag Editor navigate to Properties Tab and expand the Advanced section. Select the error-handling property, and click the three dots that appear on the right side of the Properties window.

 

Step 3

Presented in the Error-Handling window are six different Error Handling options available to each type of Windward tag. The Ignore and Node Error Handling options correspond to different Error Handling issues.  Example, Ignore type error checks for data type mismatch issues.

 

Select each Error Handling option by clicking the check box next to that option, when finished click OK.

 

Note: Treat warning as error will be discussed later.

 

Step 4

To save error handling property changes, click Save Tag icon in the Tag Editor.

 

Error Handling is now enabled for this tag in your template. Viewing instances of Error Handling in your template is explained below.

Treat warning as error option

All Error Handling issues appear as warnings unless the Treat warning as error option is selected for the tag. When selected the issue appears as an error. This option enables automatic handling of issues of two different severities, warning and error.

Enable Error Handling and Verify in AutoTag

In AutoTag, Error Handling and Verify must be run together. While the two are referred to only as Verify in AutoTag, Verify reports both Verification issues and Error Handling issues. Below are two options to accomplish this.

 

Option 1 - Run Error Handling and Verify in AutoTag is by clicking the Verify button that appears in the AutoTag ribbon.

 

 

Option 2 - Generate a report. To run Verify during report generation, open the AutoTag Manager ribbon and click the Options icon. In the Options window, enable the option Verify On Report Generation. Verify is now run as the report generates.

 

Note report generation performance is not negatively affected.

 

The purpose of generating a report with the Verify On Report Generation enabled allows the report to output even if exceptions are encountered in tags with the appropriate Error Handling settings enabled. 

 

Error Handling and Verify Results in AutoTag

All issues found by Error Handling and Verify in AutoTag are displayed in the AutoTag Verify pane.

 

Issue are displayed in the pane organized by six distinct sections, one for each type of error handling issue.

 

The pane identifies an issue by either warning or errorThe tag exhibiting the issue displays the tag nickname, exception title and full tag text.

 

Java Engine: Classes and Functions

Class: ProcessReport

The ProcessReport class has been updated to contain Error Handling and Verify functionality.

void setTrackErrors(int)

Sets the error tracking during report generation for any combination of Error Handling and Verify. Pass in an integer (use one of the ProcessReportAPI constants: ERROR_HANDLING_NONE, ERROR_HANDLING_TRACK_ERRORS, ERROR_HANDLING_VERIFY, or ERROR_HANDLING_ALL).

ErrorInfo getErrorInfo()

Returns an ErrorInfo object containing a list of Issues.

Class: ErrorInfo

A class containing a list of issues found during report generation.

boolean hasErrors()

Returns a true/false whether the object contains issues

List<Issue> getErrors()

Returns a list of issues that were encountered during report generation

Class: Issue

A class that stores the relevant information of an issue encountered during report generation. Can be of type Warning or Error.

Date getDate();

Returns a date object of when the issue occured

Issue.Type getType()

Returns the category of Error Handling or Verify that the issue belonged to (Type, Formatting, Select, Node Does Not Exist, Node Must Not Return Null, and Verify)

Tag getTag()

Returns the Tag object that caused the issue

String getMessage()

Returns the full message of the issue, the same message that is displayed in the Verify window in AutoTag.

.NET Engine: Classes and Functions

Class: Report

The ProcessReport class has been updated to contain Error Handling and Verify functionality.

Int TrackErrors { set; }

Sets the error tracking during report generation for any combination of Error Handling and Verify (use one of the Report.ERROR_HANDLING bitmaps: NONE, TRACK_ERRORS, VERIFY, or ALL) and cast to integer.

ErrorInfo GetErrorInfo()

Returns an ErrorInfo object containing a list of Issues.

Class: ErrorInfo

A class containing a list of issues found during report generation.

bool hasErrors()

Returns a true/false whether the object contains issues

java.util.List getErrors()

Returns a list of issues that were encountered during report generation

Class: Issue

A class that stores the relevant information of an issue encountered during report generation. Can be of type Warning or Error.

Date getDate();

Returns a date object of when the issue occured

Issue.Type getType()

Returns the category of Error Handling or Verify that the issue belonged to (Type, Formatting, Select, Node Does Not Exist, Node Must Not Return Null, and Verify)

Tag getTag()

Returns the Tag object that caused the issue

String getMessage()

Returns the full message of the issue, the same message that is displayed in the Verify window in AutoTag.

Running Error Handling/Verify in the RESTful Engine

Adding Error Handling and Verify functionality into your RESTful app is very easy. All you need to do is add a single XML tag into your request body with an integer value 0-3 to indicate what combination of Error Handling and Verify you want to run.

 

<TrackErrors>0</TrackErrors> disables both Error Handling and Verify

<TrackErrors>1</TrackErrors> enables Error Handling only

<TrackErrors>2</TrackErrors> enables Verify only

<TrackErrors>3</TrackErrors> enables both Error Handling and Verify

 

Errors encountered during report generation are listed after the returned report data tag in the following form:

 

<Errors>

     <Issue>

         </Message>

     </Issue>

</Errors>