OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
6-1
6
Recovering From Errors
The GPI provides features to detect and diagnose errors that occur during GPI procedure
calls. Using these features, a client program can quickly recover from most GPI errors.
This section describes the GPI error-checking and diagnostic features. It also provides
some guidelines for error recovery. The topics covered are:
•
Using the status parameter
•
Using GPI_STATUS_
•
Primary and secondary codes
•
Error class
•
Information buffer
•
Recovering from a GIP failure
•
Recovering from a client failure
•
Recovering from fatal and internal GPI errors
Using the Status Parameter
Each GPI procedure has a status parameter that indicates the outcome of the
procedure call. Your program should check the status parameter following each
procedure call. There are three possible outcomes:
•
Success; the procedure completed in full, carrying out its defined task.
•
Warning; the procedure completed in part, carrying out a portion of its defined task,
or it completed in full, but something noteworthy occurred.
•
Error; no part of the procedure completed.
The status parameter returns a 16-bit integer code. The value and literal name of
each status code is defined in the declaration files. Most of the codes are based on
XAPIA specifications and begin with the prefix OM-RC- or MH-RC-. Others are
Compaq-proprietary and begin with the prefix ZGPI-RC-.
There is a single code for success, a single code for warning, and many codes that
indicate errors:
•
OM-RC-SUCCESS (integer value = 0)
•
ZGPI-RC-WARNING (integer value = 23)