The mi_error_desc_is_copy() function

The mi_error_desc_is_copy() function determines whether the specified error descriptor is a user copy.

Syntax

mi_integer mi_error_desc_is_copy(err_desc)
   MI_ERROR_DESC *err_desc;
err_desc
A pointer to the error descriptor to examine.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_error_desc_is_copy() function determines whether the err_desc error descriptor is a user copy. A user copy of an error descriptor is one that the mi_error_desc_copy() function has allocated. The mi_error_desc_destroy() function returns an error if you attempt to deallocate a system-allocated error descriptor. Use this function to determine when to perform deallocation of an error descriptor with the mi_error_desc_destroy() function.

An invalid error descriptor can cause the mi_error_desc_is_copy() function to fail.

For a general discussion of how to determine if an error descriptor is a copy, see the HCL OneDB™ DataBlade® API Programmer's Guide.

Return values

MI_TRUE
The error descriptor that err_desc references is a user copy.
MI_FALSE
The error descriptor that err_desc references is not a user copy.
MI_ERROR
The function was not successful.