Creates a new AMI error for the specified error code and descriptive text. Descriptive text is specified as a template (
printf format) and substitution arguments. If error creation fails then an error describing this failure is returned in place of the specified error.
The ami_Error is an object handle representing allocated resources and must be destroyed using the
ami_ErrorDestroy() function or memory will be leaked. The AMI C API application must destroy any
ami_Error instances returned by an AMI C API function call. It must also destroy any
ami_Error instance it explicitly creates with the exception of
ami_Error instances returned to the AMI C API from a method invocation callback function.