Create a copy of an error descriptor
The DataBlade® API passes the error descriptor as an argument to the callback. Therefore, the DataBlade® API allocates memory for the error descriptor when it invokes the callback and deallocates this memory when the callback exits. To preserve the error information for the calling routine, you can create a user copy of the error descriptor within the callback.
The following DataBlade®
API functions
facilitate an error-descriptor copy.
DataBlade® API function | Description |
---|---|
mi_error_desc_copy() | Allocates memory for a user copy of a specified error descriptor and returns a pointer to this user copy |
mi_error_desc_is_copy() | Determines whether the specified error descriptor is a user copy |
mi_error_desc_destroy() | Frees memory for a specified user copy of an error descriptor (which was allocated with mi_error_desc_copy()) |