Sun Java System Messaging Server 6 2005Q4 MTA Developer's Reference

mtaEnqueueError()

Retrieve an extended error message.

Syntax


const char *mtaEnqueueError(mta_nq_t    *nq_ctx, const char **message,
                            size_t      *message_len,
                            int          item_code);

Arguments

Arguments  

Description  

nq_ctx

An enqueue context created by mtaEnqueueStart().

message

Optional address of a pointer to receive the address of the NULL terminated error message text. A NULL value may be supplied for this argument. 

message_len

Optional address of a size_t to receive the length in bytes of the error message text. A NULL value may be supplied for this argument.

item_code

Reserved for future use. A value of zero must be supplied for this call argument. 

Description

When mtaEnqueueTo() returns an MTA_NO error message, there is often extended error information available, which takes the form of a text string suitable for writing as diagnostic output. To retrieve this information, issue mtaEnqueueError() immediately after receiving an MTA_NO error return from mtaEnqueueTo().

Return Values

In the event of an error from mtaEnqueueError(), a NULL value will be returned and mta_errno is set to indicate the error status code. The following table lists the error status codes, and gives a description of them.

Error Status Codes  

Description  

0

Normal, successful completion. 

MTA_BADARGS

This value is returned for one of the following reasons: 

  1. A NULL value was supplied for the nq_ctx call argument.

  2. An invalid context was passed for nq_ctx.

MTA_THREAD

Simultaneous use of the enqueue context by two different threads was detected. 

Example

None