IDL

STRMESSAGE

STRMESSAGE

The STRMESSAGE function returns the text of the error message specified by Err. This function is especially useful in conjunction with the CODE field of the !ERROR_STATE system variable which always contains the error number of the last error. The MSG field of the !ERROR_STATE system variable contains the text of the last error message.

Examples


Print the error message associated with error number 4 by entering:

PRINT, STRMESSAGE(4)

Syntax


Result = STRMESSAGE( Err [, /BLOCK | , /CODE | , /NAME] )

Return Value


Returns the error message text.

Arguments


Err

The error number or text. Programs must not make the assumption that certain error numbers are always related to certain error messages—the actual correspondence changes over time as IDL is modified.

Keywords


BLOCK

Set this keyword to return the name of the message block that defines Err. If this keyword is specified, Err must be an error code.

CODE

Set this keyword to return the error code for the error message specified in Err. If this keyword is specified, Err must be an error name.

NAME

Set this keyword to return a string containing the error message that goes with Err. If this keyword is specified, Err must be an error code.

Version History


Original

Introduced

See Also


MESSAGE

Notes


This page has no user notes yet. Be the first one!


This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). However, it may be restricted from transfer to various embargoed countries under U.S. laws and regulations.
© 2014 Exelis Visual Information Solutions