× 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.



>The actual Exception object is not available to your RPG program - the
replacement text for RNX0301 has the first 100
bytes of the exception.toString() value.

Sorry for the dumb question, but how do I get at the replaceable text?  I
haven't used MONITOR that much to date.  Is it in a message file?  PSDS?  C
API's?

Thanks,
Aaron Bartell

-----Original Message-----
From: Barbara Morris [mailto:bmorris@xxxxxxxxxx]
Sent: Monday, July 14, 2003 4:55 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Catch Java Exceptions in RPG


"Bartell, Aaron L. (TC)" wrote:
> 
> After reading that I don't feel like I have enough information to build an
> error trapping routine in RPG (it is very vague as to where you need to
> specify a procedure pointer for the Exception).  Do have something like
this
> working in code that you could share?
> 

Aaron, I hit Send before I was finished my previous post, so I never
finished the "to handle it in rpg" part.

The section that Shannon mentioned mainly deals with handling JNI
exceptions when you are not using the EXTPROC(*JAVA) support, but
instead you are doing all the JNI calls for the method-call yourself. 
Only in the last sentence, it says what happens when you let RPG make
the method-call using the EXTPROC(*JAVA) support.  In that case, RPG
converts the Java exception to an RNX030x exception (RNX0301 for a
thrown Java exception).  The actual Exception object is not available to
your RPG program - the replacement text for RNX0301 has the first 100
bytes of the exception.toString() value.

The RPG exception handling would be coded the same as for a normal call
that might fail - (E) extender or MONITOR.

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.