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_Erro
r 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 |
|
Unable to create AMI error due to memory allocation failure |
|
Insufficient memory to process request |
|
Specified AMI error handle is invalid |
|
Specified AMI error handle is invalid or corrupted |
|
Required argument not specified (null) |
|
Invalid argument specified |
|
Specified AMI session handle (bad handle) is invalid |
|
Specified AMI session handle (bad handle) is invalid or corrupted |
|
Specified AMI method handle (bad handle) is invalid |
|
Specified AMI method handle (bad handle) is invalid or corrupted |
|
Specified AMI subscription handle (bad handle) is invalid |
|
Specified AMI subscription handle (bad handle) is invalid or corrupted |
|
Specified AMI parameter list handle (bad handle) is invalid |
|
Specified AMI parameter list handle (bad handle) is invalid or corrupted |
|
Specified AMI parameter list handle (bad handle) is invalid |
|
Specified AMI parameter list handle (bad handle) is invalid or corrupted |
|
Specified AMI parameter handle (bad handle) is invalid |
|
Specified AMI parameter handle (bad handle) is invalid or corrupted |
|
TIBCO Rendezvous error (RV error number): (RV error text) |
|
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 |