!ERRTEXT() |
|
|
The !ERRTEXT() subroutine returns a text description of an error number.
Format
CALL !ERRTEXT(text, qm.error{, os.error})
where
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 either be called before any actions are performed that might lose this value (e.g. file operations) or the error number must be passed as the optional os.error argument.
If qm.error is not recognised, the subroutine returns qm.error as the text description.
Examples
CALL !ERRTEXT(TEXT, STATUS()) DISPLAY 'Error ' : STATUS() : ' ' : TEXT or DEFFUN ERRTEXT(ERRNO) CALLING "!ERRTEXT" DISPLAY 'Error ' : STATUS() : ' ' : ERRTEXT(STATUS()) |