sstore_err_action, sstore_err_code, sstore_err_description, sstore_warning_next - Error interface to Statistics Store
cc [ flag... ] file... -lsstore [ library... ] #include <libsstore.h> const char const *sstore_err_action(sstore_handle_t hdl); sstore_err_t sstore_err_code(sstore_handle_t hdl); const char const *sstore_err_description(sstore_handle_t hdl); sstore_warning_t sstore_warning_next(sstore_handle_t, char **idp, char **descp);
Handle to libsstore
Address to store the identifier
Address to store the warning description
These functions retrieve information about any error that occurred during the most recent function call made using the given libsstore handle.
sstore_err_code() returns the error code. Possible error codes are as follows:
Success.
No more records left to iterate.
Handle is invalid.
Some arguments are invalid.
The result size for the function call is larger than the maximum result size requested.
The caller is not authorized.
Statistics Store is busy. Please retry after some time.
There is insufficient memory.
The connection to Statistics Store daemon (sstored(8)) is broken.
An internal error occurred.
sstore_err_action() returns a human readable string describing what failed. If no error has occurred it returns a NULL.
sstore_err_description() returns a human readable string describing why the requested operation failed. If no error has occurred it returns a NULL.
sstore_warning_next() retrieves the next warning from the list of warnings for the most recently requested operation. It sets the idp to the identifier associated with the warning and descp to the description of the warning. It returns a warning code associated with the current warning.
Possible warning codes are as follows:
No Warning.
Handle is invalid.
The given identifier is not valid for the requested operation.
Some internal error occurred while during the requested operation for the given identifier.
Could not connect to the remote statistics sstore with which the given identifier is associated.
Unable to resolve the ssid.
The caller is not authorized.
sstore_err_code() returns an error code.
Upon successful completion, sstore_err_action() and sstore_err_description() return a string. Otherwise, they return NULL.
Upon successful completion, sstore_warning_next() returns a warn code other than SS_WARN_HANDLE_INVALID. It returns SS_WARN_OK when there are no more warnings to iterate through. On failure, it returns SS_WARN_HANDLE_INVALID.
The sstore_err_action(), sstore_err_description(), and sstore_err_warning() functions will fail if:
The handle is invalid.
sstore_warning_next() will fail if:
The handle is invalid.
See attributes(7) for descriptions of the following attributes:
|
libsstore(3LIB), sstore_alloc(3SSTORE), attributes(7), sstored(8)