[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface: Messages and Codes

Chapter 1. General Information

During the processing of your graPHIGS API subroutine calls, errors may occur. For example, an invalid parameter value may be passed or a hardware error may occur at the workstation. These errors are most commonly reported to your application in an error message that describes the error situation. Your application has several facilities for dealing with errors. For example, it can cause the error message to be displayed on a user's terminal, or it can require additional information from the graPHIGS API This chapter describes how the errors are reported, the information provided with the error, and options available to your application in processing the error and its message.

Note: See "Distributed Application Program Error Processing" for a description of restrictions on error processing by a DAP.

Most errors are reported to your application for further processing. However, some errors, such as errors encountered during a traversal, result in a default action being taken, and no error is reported. If the error did not occur during the processing of an inquiry subroutine, the error and the associated message are processed by the error facilities of the graPHIGS API

The remainder of this chapter presents the errors and messages, as well as the graPHIGS API error processing performed. If the error is detected during the processing of an inquiry subroutine, an error number is returned as the error indicator errind parameter. These error numbers are listed with the errind parameter description of each inquiry subroutine listed in The graPHIGS Programming Interface: Subroutine Reference In addition to the errors listed with each subroutine description, it is possible that additional errors will be reported when the error occurs within an internal service of the graPHIGS API See "Error Numbers" for a description of the error numbers by the graPHIGS API in the errind parameter.

A few errors are so severe that the graPHIGS API will terminate processing. This termination will be done using the ABORT service of AIX and the ABEND service of MVS and VM. For the ABORT service, a 1204 message is displayed on 'stderr' that provides the ABORT code for the error that occurred. These ABORT codes and a brief explanation of the error are listed in Appendix B. For the ABEND service, the ABEND code identifies the error that occurred. These ABEND codes and a brief explanation of the error are listed in Appendix A.

graPHIGS API Error Processing

For most errors detected by the graPHIGS API, the error is reported by using a message that briefly explains the problem that has been detected. This is performed by the graPHIGS API error processing facilities. You and your application can control whether this message is displayed or whether it is to be suppressed. In addition, your application can provide recovery routines to be invoked as error handling routines for processing the error.

The graPHIGS API error processing defaults to logging the error messages in a designated error file. See "Application Error Processing" for a description of replacing this default error processing with your own application error processing. This error file is specified as a parameter of the GPOPPH subroutine.

For AIX
This parameter specifies a filename in the current working directory.

For MVS
This parameter specifies a DDNAME.

For VM
This parameter specifies a filename. The filetype is AFMPELOG.

If you specify blanks for the file name, or if the error file is not usable, the error message is written to 'stderr,' which defaults to the console (AIX), to the job log (MVS batch processing), or to the user's terminal (VM and MVS).

Error Message Format

Each error message provided by the graPHIGS API consists of the following parts. See Example of an error file entry.

API Subroutine Name
Name of the graPHIGS API subroutine associated with the error.

Message Identifier
The three-letter product identifier 'AFM' followed by a four-digit message number.

Message Text
A brief explanation of the error.

Date and Time
The date and time when the error occurred (AIX only).

Example of a graPHIGS API Error File Entry

GPCR    AFM0049  COLOR INDEX EXCEEDS WORKSTATION TABLE CAPACITY

Note: Specific errors detected by the subroutines are listed with the corresponding subroutine description in The graPHIGS Programming Interface: Subroutine Reference

The graPHIGS API subroutine name is provided to help identify a graPHIGS API subroutine call that may have caused the error. For most errors, this name is the graPHIGS API subroutine called by your application. In the case where the error is not directly related to any graPHIGS API subroutine call (such as an asynchronous hardware error), the subroutine name field contains asterisks. In addition, it is not possible to always identify the subroutine call issued by your application that may have caused the error. For example, the error may be detected long after the invoked graPHIGS API subroutine has returned to your application and other graPHIGS API subroutines have been called. The graPHIGS API provides the name of a graPHIGS API subroutine that is most likely to have been invoked when the error occurred. In the case where such a related subroutine name is provided in the error message, an asterisk follows the subroutine name to indicate that the identified subroutine may not be the actual subroutine called. See Appendix C for more information on errors not directly related to any API subroutine calls.

Message Numbers

The message number provided in each message identifies each unique error message text, and identifies the additional information in the error message descriptions in the remaining chapters of this manual. The message numbers are arranged in groups of related messages. Message groups are defined as follows:

Messages 1-899
Base graPHIGS API messages for errors that are device-independent. These messages generally identify errors in the parameters passed to the graPHIGS API subroutines.

Messages 1000-1299
System Service messages generated by errors in the internal service utilities.

Messages 1300-1399
Distributed Application Process (DAP) messages generated from errors while processing a distributed application.

Messages 2000-2999
Device-dependent messages for errors detected during processing for a specific workstation.

Error Message Description

The remaining chapters of this manual provide additional information for each of the error messages provided by the graPHIGS API The description of each error contains the following information. See Error Description Example.

Explanation
A statement of why the error was issued.

System action
A statement of what the graPHIGS API does, if anything, as a result of the error.

There are two types of system actions, warning and ignoring subroutine.

  1. Warning - A default action may be taken, causing the result to differ slightly from the intended action.
  2. Ignoring subroutine - No graphical data or state list is modified, nor is any workstation affected. The resulting effect is as though the subroutine was never called.

Programmer Response
Actions for the programmer to perform to resolve the problem.

Error Description Example

1           FUNCTION REQUIRES STATE PHCL

Explanation: A second call to GPOPPH was made using the
non-reentrant interface without an intervening call to GPCLPH

System Action: The subroutine call in error is ignored.

Programmer Response: Correct the program so that GPOPPH
is not called when the graPHIGS API is initialized already.

Error Number: 1

Application Error Processing

Your application can provide error handling routines that are called by the graPHIGS API whenever an error occurs. See The graPHIGS Programming Interface: Subroutine Reference and The graPHIGS Programming Interface: Technical Reference for a complete description of error processing. The routine identified on the GPEHND subroutine is invoked in place of the graPHIGS API error processing. When invoked, this error exit routine can perform the processing required to deal with the error for the application. The error handling routine can cause the error message associated with the error to be written to the error file by using the GPELOG subroutine. The error exit can also obtain the text of the error message by issuing the GPQEMS subroutine call. Note that these two functions can only be invoked by a first-level error exit, since the graPHIGS API must be in an error state for an error message to be available.

Error Numbers

One of the parameters provided to your first-level error handling routine is an error number. See the GPEHND subroutine call in The graPHIGS Programming Interface: Subroutine Reference for a complete description of the interface and parameters passed to your error handling routine. The error number identifies the error that has occurred and reveals the severity of the error. This can assist you in determining how your error handling routine should react to the error.

The error number provided to your error handling routine is related to, but is separate from, the message number of the error message text associated with the error. For most errors, the error number and the message number are the same number. Only for the Device Support errors (900-999) are the error numbers different from the message numbers. For the Device Support errors, the error numbers are in groups that indicate the severity of the error (see Errors 900-999 DEVICE SUPPORT). Using this grouping, your application's error handling routine can process workstation errors in general categories without having to deal with each workstation-specific error that can occur across many different workstations. The message number associated with each Device Support error is unique, and identifies the unique message text associated with the reported error.

The graPHIGS API error numbers are divided into the following ranges:

ERRORS 1-899 BASE graPHIGS API

The errors in this range are device-independent (common to all devices). Most errors will be found in this category, including errors generated by parameter validation. Note that for errors in this range, the message number is the same as the error number. There are two types of system actions in this category, warning and ignoring subroutine.

Warning
A default action may be taken, causing the result to differ slightly from the intended action.

Ignoring subroutine
No graphical data or state list is modified nor is any workstation affected. The resulting effect is as though the subroutine was never called.

ERRORS 900-999 DEVICE SUPPORT

The errors in this range are detected during processing for a specific workstation. The types of errors detected include I/O errors, workstation capacity exceeded errors, and device or host service errors. Note that for errors in this range, the message number is different from the error number. The device support errors are subdivided into the following error classes:

900-909 - INFORMATIONAL
A minor error has been detected or a previous error condition has been cleared. Processing will continue to normal completion although default actions may be taken as indicated by the message.

910-919 - WARNING
An inconsistent state has been detected. This condition is not severe. No information has been lost and the device support may be able to clear the inconsistency at a later time. The requested subroutine call has been logically completed and processing will continue to normal completion, although default actions may be taken as indicated by the message.

920-929 - ERROR
The device support was unable to complete the requested subroutine call, either logically or physically. If the requested operation was a non-structure modification subroutine, the device support will attempt to back out of the operation, so the environment can return to its previous state. Non-structure modification subroutines are effectively ignored, since the action has been reset. Structure modifications cannot be removed from the workstation detecting the error, because they are device-independent and may be completed on other workstations. Therefore, it will probably be impossible for the application to eliminate inconsistency, without closing and reopening the workstation.

930-939 - SEVERE ERROR
An inconsistency has been detected between an actual device and the current graPHIGS API state (workstation state list or graphic data content). After an error of this type, the workstation state is unknown. The application should not invoke any subroutine involving this workstation except Close Workstation or any inquiry subroutine. This is only a recommendation; other subroutine calls are not prevented, but can produce unpredictable results.

The application may attempt to return the workstation to a determinate state by closing and reopening the workstation.

940-949 - TERMINATING ERROR
The device support has detected an unrecoverable error and cannot accept any further requests. For example, this type of error will be generated if the Open Workstation subroutine call cannot be completed, or if corrupted control blocks are detected. If open, the workstation will be closed immediately to reclaim resources.

ERRORS 1000-1299 SYSTEM SERVICE ERROR

These messages are generated by the graPHIGS API service utilities. Examples of these errors include initialization, incorrect number of parameters passed on a subroutine, storage request failures, and file I/O errors. Note that for errors in this range, the message number is the same as the error number.

The state of the system after the error, is dependent on the error conditions. Some errors will have no effect on the system; other errors may be unrecoverable, causing the application to terminate.

ERRORS 1300-1399 DISTRIBUTED APPLICATION PROCESSING ERRORS

These errors are generated while trying to process a distributed application. The state of the system and the distributed application after the error is dependent on the error. Note that for errors in this range, the message number is the same as the error number.

Distributed Application Program Error Processing

The execution environment of a Distributed Application Program (DAP) is more restrictive than that of the other graPHIGS API environments. Since there is no general purpose file I/O facility, messages and error file facilities are not available as part of the graPHIGS API error processing. Your application will have to provide explicit error processing in order to deal with errors that occur.

Following are the restrictions on error processing in the DAP environment:

Since the DAP error processing will not produce an error message, your application will need to use error handling routines to obtain the desired error information. A first-level error handling routine (defined using GPEHND) can pass the error number and message number parameter values to the application mainline or to a second-level error handling routine (defined using GPEXIT). From there, the information can be sent to the cooperating host application (using GPSPMS) for further processing.


[ Previous | Next | Contents | Glossary | Home | Search ]