GET_MSG_TYPE

ScriptEigener Objekttyp in der Automation Engine function: Retrieves the type of a message number

Syntax

GET_MSG_TYPE(Message number)

Syntax

Description/Format

Message number

Number of a message whose type should be read
Format: script variable or number


Return codes

"A" - Abort
"E" - Error
"I" - Information
"Q" - Query
"W" - Warning
" " - The error number does not exist.

Comments

There are different types of message numbers such as warnings and error messages.

The script function SYS_LAST_ERR_NR retrieves the number of the last message.

Example

The following example informs the administrator if an error or abort message is output:

:SET &ERRNR# = SYS_LAST_ERR_NR()
:
SET &ERRTYP# = GET_MSG_TYPE(&ERRNR#)
:
IF &ERRTYP# = "A" OR "E"
:  
SET &ERRINS# = SYS_LAST_ERR_INS()
:  
SET &MESSAGE# = GET_MSG_TXT(&ERRNR#,&ERRINS#)
:  
PRINT &MESSAGE#
:  
SET &RET# = SEND_MAIL("smith@automic.com",,"Processing error",&MESSAGE#)
:
ENDIF

See also:

Script element Description

GET_MSG_TXT

Retrieves the message text of the last error

SYS_LAST_ERR_INS

Supplies the variable message part of the last error

SYS_LAST_ERR_NR

Returns the number of the last error

Script Elements - Error Handling and Messages

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function