SPI Programming Manual (G06.24+, H06.03+, J06.03+)

General SPI Programming Guidelines
SPI Programming Manual427506-006
5-49
Reporting Errors From the SPI Procedures
As for the failure of SSGET on a header token, check that the buffer for this error
response is large enough, and handle any errors from the procedures involved in
creating the response.
Failure of SSINIT When Initializing a Response Buffer
If SSINIT fails for any reason except buffer full, a serious error has occurred. If your
buffers are all of adequate size, you should consider a buffer full error to be a serious
error, too.
If your server process is one that should stop on internal errors to limit data corruption,
have the process stop if it gets an error from SSINIT.
If your process is one that does not need to stop to limit data corruption, your server
can either stop or attempt to report the SSINIT failure.
If you report a failure of SSINIT, your server should return an error response to report
the problem (see the guidelines for Failure of SSGET on a Header Token
on
page 5-48.
Some suggestions:
HP recommends that your subsystem stop immediately instead of attempting to
continue.
If you do attempt to continue and report the failure, initialize and build a buffer for a
response (see Failure of SSGET on a Header Token
on page 5-48).
It is not imperative that you ignore ZSPI-TKN-MAXRESP. However, for simplicity, it
is recommended that you return a single response record per response.
If errors occur while attempting to build the response, your server can ignore them
and return whatever gets built as the response. This might result in a garbage
response, but in this situation it is unlikely that any other method would provide
more information.
Failure of SSPUT When Building a Response
If your server builds a response containing multiple response records and relies on
getting the buffer full error to determine when it is at the end of the buffer, it should
perform whatever corrective action is necessary when the buffer is full.
In all other cases, an SSPUT error is a serious failure. If your process is one that
should stop on internal errors to limit data corruption, have the process stop if it gets an
error from SSPUT.
If your process is one that does not need to stop to limit data corruption, your server
can either stop or attempt to report the SSPUT failure.
If you do report a failure of SSPUT, your server should return an error response to
report the problem, (see the guidelines for Failure of SSGET on a Header Token
on
page 5-48).