Catch Try

A while back someone published some code to extract the associate Error Message. Could you provide that information again? Thanks.

Hi, Tony:

The following is what I posted at that time. I hope it is useful to you. As I remember some others had posted their codes.

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.

HI,
hi i want to subract a date also i create a new date object from the Broker date and i am using that in the select and update query there is now cimpiler error
but the query is not executed.
What is the correct way to do it.
the code is
out.swipe_date_1 = new BrokerDate( swipe_date.getJavaCalendar().get(Calendar.YEAR) ,swipe_date.getJavaCalendar().get(Calendar.MONTH)+1,swipe_date.getJavaCalendar().get(Calendar.DATE)-1 , 0 , 0 ,0 ,0 );

What error is being thrown, Kulandai? Is it a “ClassDefNotFound” Exception?

i shall exlain the whole process
ther is Broker DAte
and i get that date and derive all the
year , month day
and create a new BrokerDate
of year,month and day-1
in the format dd.MM.yyyy
and pass that to the query
which should find records
in any of the dates
but the query returns
not values eventhough the table contains
values of that condition

what is that BrokerData
and how does the getJavaCalendar and getJavaDate
and toString methods behave

Explain this ???

Kulandai George

The declarationStep is the same that mapStep?
I try but I don’t see the results…

Hi, Kundalai.

I am pretty sure that I documented your exact issue a few months back. Read [url=“wmusers.com”]wmusers.com and tell me if that fits.

Joe Jantz followed up the original post by saying that webMethods is aware of the issue.