Reading Exceptions for Outbound Synchronous Integrations

The Routing – Routings Definition page features a User Exception check box that enables you to capture Integration Broker exceptions for outbound synchronous integrations using PeopleCode.

Note:

Do not use Try/Catch PeopleCode to attempt to read exceptions on outbound SyncRequest calls.

The following code example shows how to read captured exceptions:

&Return_MSG = %IntBroker.SyncRequest(&MSG);
If &Return_MSG.ResponseStatus = %IB_Status_Success Then

/* process the response message */
 &RS = &MSG.GetPartRowset();
Else

 /* evauate the error and either throw a PeopleCode exception or continue⇒
    processing */
   &error_string = &Return_MSG.IBException.ToString());
   &nErrorMsgNumber = &Return_MSG.IBException.MessageNumber;
   &nErrorMsgSetNumber = &Return_MSG.IBException.MessageSetNumber;

End-If;