Programming Guide |
Specifies an error message to report for a transaction manager error
#include <tmusubs.h>int sm_tm_failure_message(int type, char *caller_id, char *text);
type
- The event calling this function. This event must be
TM_NOTE_FAILURE
orTM_NOTE_UNSUPPORTED
.caller_id
- Identifier for the calling program. If this is not supplied, the generated
caller_id
has embedded in it the previous event name or number and the previous transaction model or transaction event function name.text
- The text for the error message. If this is not supplied, a generic error message is generated.
- ·
TM_OK
When the transaction manager generates either the
TM_NOTE_FAILURE
or theTM_NOTE_UNSUPPORTED
event, the standard transaction models callsm_tm_failure_message
to generate an error message for the previous event.
sm_tm_failure_message
checks the value ofTM_STATUS
and sets it to -1 if the value is 0.
/* The following example taken from the standard
transaction model for JDB shows the processing for
these events. */case TM_NOTE_FAILURE:
case TM_NOTE_UNSUPPORTED:
retcode = sm_tm_failure_message(event, "", "");
break;