SetMessageError method: IntBroker class
Syntax
SetMessageError(TransactionID, MsgSet, MsgNumber, Error_Location, ParamListCounter, [Param] ...)
Description
Use the SetMessageError method to write messages to the error queue. This method is used with asynchronous messages only.
Parameters
| Parameter | Description |
|---|---|
|
TransactionID |
Specify the transaction ID for the message as a string. |
|
MsgSet |
Specify the number of the message set that the message associated with the error is associated with. |
|
MsgNumber |
Specify the message number that you want to associate with this error. |
|
Error_Location |
Specify where the error occurred, or any additional information you want to give about the error. This is a string, and allows 254 characters. |
|
ParamListCounter |
An integer value from 0 to 4 specifying the number of Param substitution strings to be passed. |
|
Param |
Specify up to four Param values to be used as substitution strings in the message text. The first Param value is used in the first substitution (that is, for %1,) the second is used in the second (that is, for %2), and so on. |
Returns
A Boolean value, true if the error message was associated correctly, false otherwise.
Example
The following is an example of setting an error message for the web services gateway:
&Rslt = %IntBroker.SetMessageError(&TransactionId, &msgset, &msgnum, "error ⇒
location", 4, &parm1, &parm2, &parm3, &parm4);
If you are passing just two parameters, then the call would be similar to this:
&Rslt = %IntBroker.SetMessageError(&TransactionId, &msgset, &msgnum, "error ⇒
location", 2, &parm1, &parm2);