Using the Diagnostic Information

If there is an error on the device side, the developer should copy such errors to the pcErrorInfoOut parameter of the callback API. The developer should use this parameter to provide a relevant error description for diagnosing issues related to interface implementation.

Developers should not overwrite the buffer allocated for this parameter. The maximum size of this buffer (512 bytes) has been defined in lscpdif.h using the macro MAX_ERROR_BUF_SIZE. The maximum storage limit for this buffer is MAX_ERROR_BUF_SIZE -1.

If tracing is enabled in the License Manager or Sentinel RMS libraries, this information is also printed in the trace logs to provide more information about the device errors.

The following code snippet describes the usage of the pcErrorInfoOut parameter with the help of a sample code snippet.

rc = sqlite3_initialize( );
   if(rc !=  SQLITE_OK)
   {
      sprintf(pcErrorInfoOut, "Error from sqlite3_initialize(), Error code - %d", rc);
      return VLS_CPD_DEVICE_FATAL_ERROR;
   }

For more information about implementing the interface callback API and using the pcErrorInfoOut parameter, refer to the cpd_sqlite.c sample file.