![]() | 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_FAILUREorTM_NOTE_UNSUPPORTED.caller_id- Identifier for the calling program. If this is not supplied, the generated
caller_idhas 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_FAILUREor theTM_NOTE_UNSUPPORTEDevent, the standard transaction models callsm_tm_failure_messageto generate an error message for the previous event.
sm_tm_failure_messagechecks the value ofTM_STATUSand 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;
![]()
![]()
![]()
![]()