!ERRTEXT()

Top  Previous  Next

 

The !ERRTEXT() subroutine returns a text description of an error number.

 

 

Format

 

CALL !ERRTEXT(text, errno)

 

where

 

textis the returned descriptive text.

 

errnois the error number.

 

 

The !ERRTEXT() subroutine can be used to retrieve a text description of a QM error number for display to a user or entry into a log file.

 

Where relevant, the associated operating system error number will be inserted into the text. For this to be correct, the !ERRTEXT() subroutine must be called before any actions are performed that might lose this value (e.g. file operations).

 

If errno is not recognised, the subroutine returns errno as the text description.

 

 

Examples

 

CALL !ERRTEXT(TEXT, STATUS())

DISPLAY 'Error ' : STATUS() : ' ' : TEXT

or

DEFFUN ERRTEXT(ERRNO) CALLING "!ERRTEXT"

DISPLAY 'Error ' : STATUS() : ' ' : ERRTEXT(STATUS())