× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Dan,

Yes, I tried catching Throwable before but did not work. I will double check this approach again.

I agree with you that the invoke method does not have the code to throw some descendent of Exception.

Thanks,
Derek

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dan Kimmel
Sent: Thursday, November 05, 2009 12:44 PM
To: Java Programming on and around the iSeries / AS400
Subject: RE: ProgramCallBean invoke method exception

Derek,

Have you tried catching Throwable instead of Exception in your
catch-all? Often the jvm will throw an error for a machine error, such
as a memory overrun, that is not in the inheritance path of Exception
and thus will not be caught by the usual catch-all (try {...}catch
(Exception e){}). Generally, such exceptions shouldn't be caught by user
code; they are intended to bubble up to the OS. However, you're dealing
with fairly low level stuff here and may need to catch it. In truth,
such errors should be caught by the ProgramCallBean invoke method which
would throw some descendent of Exception. Entirely likely that code
isn't there.

Regards,
Dan

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Derek Chow
Sent: Thursday, November 05, 2009 10:32 AM
To: Java Programming on and around the iSeries / AS400
Subject: RE: ProgramCallBean invoke method exception

Thanks, Bill! I tried your approach by removing the field length in the
data structure in the PCML definition, but still encountered the same
issue. It seems like I may need to do a bigger scope of modification if
I go with your approach. Not sure if I want to do that as we are running
out of time.

For now, I will monitor other returned parameter values, which are not
set, to determine any unknown exception. ... not an ideal solution but
should work.

Still I have no idea how to capture those exceptions from the invoke()
method of the IBM ProgramCallBean class.

Thanks,
Derek


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.