SYS_LAST_ERR_SYSTXT
Script Function: Retrieves the last-occurred error message from the operating system
Syntax
SYS_LAST_ERR_SYSTXT ()
Return codes |
---|
Error text from the operating system of a latest
occurred error |
Comments
This script function determines the error message supplied by the operating system in case of occurring errors. The return code of this script function is the message text or an empty string if there was no error.
Example
The example tries to check the memory of a drive. An error occurs if it is not available. The message text of the operating system ("System cannot find specified path.") will then be sent to a user.
:SET &CHECK# = GET_FILESYSTEM("WIN21G", "Z:\", FILESYSTEM_SPACE_TOTAL)
:SET &MESSAGE# = SYS_LAST_ERR_SYSTXT()
:IF &MESSAGE# NE ""
: SEND_MSG BU,BU,"System error:
&MESSAGE#"
:ENDIF
See also:
Script element | Description |
---|---|
SYS_LAST_ERR_NR | Returns the number of the error that has last occurred. |
Script Elements - Error Handling and Messages
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function