Next: , Previous: , Up: Statistics Storage   [Contents][Index]


3.6 Getting the Reason of a Storage Failure

When a Storage API function returns error code QSMM_ERR_STORAGE, the function generates at least one message that describes an error occurred. The error messages are held in a message list associated with storage. The message list is cleared upon entry to every Storage API function that might return error code QSMM_ERR_STORAGE. See Messages and Message Lists, for more information on working with error message lists.

A message list is represented by a handle of type qsmm_msglist_t. A message list associated with storage can be obtained using the following function.

Function: qsmm_msglist_t qsmm_get_storage_msglist (qsmm_storage_t storage)

This function returns the handle of a message list associated with storage. This function never returns NULL.

When a Storage API function returns error code QSMM_ERR_STORAGE to an application program, which executable is named prg_name, the error message list can be dumped to stderr using a line of code like this:

qsmm_msglist_dump(qsmm_get_storage_msglist(storage),prg_name,0,0,stderr);