The libddpi error parameter

The error parameter is a required parameter for all ddpi operations. It accepts and returns either the Ddpi_Error object or NULL.

Description

Before a Ddpi_Error object can be used to capture error situations, it must be passed as an error parameter when the ddpi_init operation is called. In other words:
  • For every libddpi instance, a unique Ddpi_Error object is initialized when the error parameter is passed to the ddpi_init operation.
  • When an libddpi instance is terminated with theddpi_finish operation, the program analysis application must pass the corresponding Ddpi_error object as a parameter. The ddpi_finish operation terminates both the Ddpi_Info object and its corresponding Ddpi-Error object.
When an error occurs, the error parameter value determines how the error condition is handled:If the error parameter is not NULL, error information is stored in the Ddpi_Error object.If the error parameter is NULL:The libddpi error process looks for the error-handling callback function specified by the ddpi_init operation.If no callback function was specified, the operation terminates abnormally.