HPlogo Asynchronous Serial Communications Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 8 Intrinsics Reference

FERRMSG

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Returns a message corresponding to an FCHECK error number.

Syntax

           I16       CA       I16
FERRMSG(fserrorcode,msgbuffer,msglength);

Use

You can use FERRMSG in your program to obtain the error message associated with a specific error number returned in a call to FCHECK. The FCHECK error number is used as the value of fserrorcode in the call to FERRMSG. The textual message associated with the error number is then returned in msgbuffer, with the length of the message returned in msglength.

A typical error handling routine might consist of the following steps:

  1. Check condition code.

  2. If CCL or CCG, call FCHECK to obtain specific details about the error that occurred, including the error number.

  3. Call FERRMSG using the error number obtained in the FCHECK call as the value of fserrorcode.

You can then print the error message, display it to the terminal screen or console, or take whatever action is appropriate.

Parameters

fserrorcode

16-bit signed integer by reference (required)

Passes an error code returned by the FCHECK intrinsic indicating which message is to be returned in msgbuffer.

msgbuffer

character array (required)

Returns the error message associated with fserrorcode. To contain the longest possible message, msgbuffer must be a minimum of 72 bytes long. Note that all character arrays must start on a halfword boundary.

msglength

16-bit signed integer by reference (required)

Returns the length of the error message contained in msgbuffer. The length is returned as a positive byte count.

Condition Codes

CCE

Request granted.

CCG

Request denied. No error message exists for the fserrorcode.

CCL

Request denied. The msgbuffer address was out of bounds, msgbuffer was not large enough, or msglength was out of bounds

Additional Discussion

See the discussion of returning error messages to your program in Accessing Files Programmer's Guide.

Feedback to webmaster