ScriptEigener Objekttyp in der Automation Engine Statement: Determines the reaction to particular errors and messages of script elements
Syntax
:ON_ERRORReaction
Syntax |
Description/Format |
---|---|
Reaction |
Keyword for the reaction to errors and messages Allowed values: "ABEND", "RESUME" |
Comments
This script statement influences the following script functions:
GET_STATISTIC_DETAIL | SYS_USER_ALIVE |
By default, AE ensures that script processing with these script functions is not aborted if errors occur. These errors can be analyzed with the Script Functions for Error Handling.
The "ABEND" parameter prompts the script processing to be aborted if an error occurs. "RESUME", on the other hand, continues the script and the return codes of the previously listed functions can be read.
Example
The example below specifies that the script will not be canceled in the event of an error. The system then attempts to check the capacity of a non-existing drive. An error occurs which can be analyzed with the script functions for error handling.
:ON_ERROR RESUME
:SET &CHECK# = GET_FILESYSTEM('WIN21', 'Z:\', FILESYSTEM_SPACE_TOTAL)
:SET &ERRNR# = SYS_LAST_ERR_NR
:SET &ERRINS# = SYS_LAST_ERR_INS
:SET &MESSAGE# = GET_MSG_TXT (&ERRNR#,&ERRINS#)
See also:
Script Elements - Error Handling and Messages
Sample Collection:
Retrieving Error Message and Number
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function