Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

OnError

Use this command to specify how the process should proceed after encountering an error.

Syntax

ONERROR Action [ErrorFile [Procedure]]

where:

  • Action is the desired action to take when the system encounters an error. Action may be one of the following:
    Value Description

    CONTINUE

    To ignore any errors and continue processing the next item in a file. If you specify the ErrorFile parameter, any errors are reported and written to an error file and the process continues. If you specify both the ErrorFile and Proc parameters, any errors are reported and written to an error file and the specified error procedure runs before the process continues.

    TERMINATE

    To terminate the process when an error is encountered. If you specify the ErrorFile parameter, any errors are reported and written to an error file and the process terminates. If you specify both the ErrorFile and Proc parameters, any errors are reported and written to an error file and the specified error procedure runs before the process terminates. This is the default setting.

    RETURN

    To terminate the current procedure and return to the calling procedure. If you specify the ErrorFile parameter, any errors are reported and written to an error file before the current procedure terminates. If you specify both the ErrorFile and Proc parameters, any errors are reported and written to an error file and the specified error procedure runs before the current procedure terminates.

  • ErrorFile is the file path of the desired location of the error file. The default error file is lv_afError.log and is written to the directory that contains Longview Application Framework binaries.
  • Procedure is an optional parameter and specifies the procedure to execute when an error occurs. ErrorFile must be specified in order to use Procedure.

Note: The same error will not be processed by the same error procedure twice consecutively.

Syntax example

ONERROR CONTINUE errorProcedure C:\LONGVIEW\ERRPROC.LVPRO

Published:

OnError

Use this command to specify how the process should proceed after encountering an error.

Syntax

ONERROR Action [ErrorFile [Procedure]]

where:

  • Action is the desired action to take when the system encounters an error. Action may be one of the following:
    Value Description

    CONTINUE

    To ignore any errors and continue processing the next item in a file. If you specify the ErrorFile parameter, any errors are reported and written to an error file and the process continues. If you specify both the ErrorFile and Proc parameters, any errors are reported and written to an error file and the specified error procedure runs before the process continues.

    TERMINATE

    To terminate the process when an error is encountered. If you specify the ErrorFile parameter, any errors are reported and written to an error file and the process terminates. If you specify both the ErrorFile and Proc parameters, any errors are reported and written to an error file and the specified error procedure runs before the process terminates. This is the default setting.

    RETURN

    To terminate the current procedure and return to the calling procedure. If you specify the ErrorFile parameter, any errors are reported and written to an error file before the current procedure terminates. If you specify both the ErrorFile and Proc parameters, any errors are reported and written to an error file and the specified error procedure runs before the current procedure terminates.

  • ErrorFile is the file path of the desired location of the error file. The default error file is lv_afError.log and is written to the directory that contains Longview Application Framework binaries.
  • Procedure is an optional parameter and specifies the procedure to execute when an error occurs. ErrorFile must be specified in order to use Procedure.

Note: The same error will not be processed by the same error procedure twice consecutively.

Syntax example

ONERROR CONTINUE errorProcedure C:\LONGVIEW\ERRPROC.LVPRO

For an optimal Community experience, Please view on Desktop