ami_Error

Type

Purpose

This is the AMI C API error object handle. It encapsulates all the information required to define and process errors generated by the AMI C API and for the user's application to pass errors to the AMI C API.

Remarks

A null ami_Error handle indicates success (i.e. no error). The convenience define AMI_OK is provided representing an ami_Error indicating success. It is recommended that you use an expression like the following when testing an ami_Error for success:

ami_Error RC;
RC = ami_Function();
if ( RC != AMI_OK )
{
   handle error condition
}

A non-null ami_Error indicates an error. The unique error code identifying the error can be obtained using the ami_ErrorGetCode() function.

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.

The unique error codes returned by the ami_ErrorGetCode() function are documented in the following table.

Error Code

Description

AMI_AMIERROR_FAILURE

Unable to create AMI error due to memory allocation failure

AMI_INSUFFICIENT_MEMORY

Insufficient memory to process request

AMI_INVALID_ERROR

Specified AMI error handle is invalid

AMI_CORRUPT_ERROR

Specified AMI error handle is invalid or corrupted

AMI_MISSING_ARGUMENT	

Required argument not specified (null)

AMI_INVALID_ARGUMENT

Invalid argument specified

AMI_INVALID_SESSION

Specified AMI session handle (bad handle) is invalid

AMI_CORRUPT_SESSION	

Specified AMI session handle (bad handle) is invalid or corrupted

AMI_INVALID_METHOD	

Specified AMI method handle (bad handle) is invalid

AMI_CORRUPT_METHOD

Specified AMI method handle (bad handle) is invalid or corrupted

AMI_INVALID_SUBSCRIPTION

Specified AMI subscription handle (bad handle) is invalid

AMI_CORRUPT_SUBSCRIPTION

Specified AMI subscription handle (bad handle) is invalid or corrupted

AMI_INVALID_PARM_TABLE

Specified AMI parameter list handle (bad handle) is invalid

AMI_CORRUPT_PARM_TABLE

Specified AMI parameter list handle (bad handle) is invalid or corrupted

AMI_INVALID_PARM_LIST

Specified AMI parameter list handle (bad handle) is invalid

AMI_CORRUPT_PARM_LIST	

Specified AMI parameter list handle (bad handle) is invalid or corrupted

AMI_INVALID_PARAMETER

Specified AMI parameter handle (bad handle) is invalid

AMI_CORRUPT_PARAMETER

Specified AMI parameter handle (bad handle) is invalid or corrupted

AMI_RV_ERROR

TIBCO Rendezvous error (RV error number): (RV error text)

AMI_UNKNOWN_INVOCATION

Received invocation request for unknown AMI method (method name)

AMI_UNKNOWN_PARAMETER

Method (method name) does not have a parameter named (parameter name)

AMI_LIST_ADD_FAILED	

Failed to add object to linked list

AMI_ARGUMENT_GET_FAILED

TIBCO Rendezvous error (RV error number) occurred attempting to get value for argument (argument name) of method (method name). (RV error text)

AMI_UNKNOWN_SUBSCRIPTION	

(Method name) invocation received for unknown subscription with context (context ID) and reply subject (subject name)

AMI_SESSION_ANNOUNCED

Attempt made to announce an AMI session which is already announced.

AMI_SESSION_STOPPED

Attempt made to stop an AMI session which has not been announced