If you are using the wM Enterprise Integrator, the code below is from ERROR CATCH Block in the EI that we used to get the caught error text.
try {
ErrorCatchStepTry();
}
catch (AdapterException ErrorCatchStepEx) {
declarationStep.stringExceptionMessage = ErrorCatchStepEx.getLocalizedMessage();
declarationStep.$strExceptionMsg = true;
ErrorCatchStepCatch();
}
declarationStep.stringExceptionMessage is a globle varible. So, you can use it everywhere within an EI component.
The line:
declarationStep.stringExceptionMessage = ErrorCatchStepEx.getLocalizedMessage();
will catch error text. Then, you can print declarationStep.stringExceptionMessage using access.println()
or you can assign the declarationStep.stringExceptionMessage to the error text field in Adapter::errorNotify and Adapter::error to publish and deliver.
#Integration-Server-and-ESB#webMethods#broker#Universal-Messaging-Broker