ITPError

The ITPError command to handle error situations in commands is deprecated.

This command does the following:

  • It returns the original error, the internal ITPLOG messages, and the internal ITPLOGDM messages as progress messages.
  • It writes an itperror.log file next to the log.
  • It re-throws the error, extended with the internal ITPLOG and ITPLOGDM messages.

ITPError saves the following files to the folder indicated at the parameter ErrorDir:

  • dm.ini
  • ITP configuration file (itp.cfg) that was active at the time of the error including all settings that were generated automatically.
  • postinc.doc: this is the result document in which the post-include statements have not been processed yet. This file is useful to debug post include paths.
  • itperror.log. This file contains all other relevant information for ITP jobs that have failed. In particular, it contains the information from ITP log and the ITP Data Manager log files. The information in the ErrorDir is appended so that it contains history for this particular ErrorDir.

Usage

To install the ITPError script as an error handler, use the following commands.

ITPErrorReset; /* Only the first time */
OnError Script(ITPError)
	  Model("Model")
	  ErrorDir ("Path\folder") 
;

A closing semicolon is required.

The usage of the command ITPErrorReset (see ITPErrorReset) before ITPError is installed as an error handler. This command is required to ensure that only relevant information is included in the error report. It should be called once, before the first time that the ITPError handler is installed. When the ITPError handler is reinstalled, such as after disabling error handling using OnError Script(*), the command ITPErrorReset should not be re-issued.

Parameters

  • Model: Required. Name of the template used in the KCM process of which the ITPError is the error handler.
  • ErrorDir: Optional. The name of the folder used to save the files to. This folder is specified relative to the Log folder of a Document Processor. By default, the name of the folder is set to the job id with which the service is called.