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



Steve;

Duane,

in java and C# you simply throw the exception. there is no relative
invocation entry that the exception is thrown to. If the calling
method does not catch the exception, that method is shut down and the
exception is effectively thrown to the next method down the call
stack.

Nothing new here, same with any ILE language except that in cases where you want to you can throw an exception anywhere in the call stack you want. (Not that you should, just that you can.)



In C#, the try { .... } finally { ... } construct guarantees that the
finally code will always run after the completion of the try code. I
think you code try {... } catch ( ApplicationException excp ) { ... }
finally { ... } to add exception handlers to the mix.

In RPG ILE we can do the same thing with a mix of MONITOR and CEExxxx
invocation exit handlers. It just does not read as well.

-Steve

But your comment previously to Arron is what I was talking about:

your monitor code will not run in the following situations:
- you call a COBOL program and it uses STOP RUN to exit.
- the called procedure sends an *ESCAPE message back to the caller
of your procedure
- the job is ended

As I said for point 1, I don't know and don't have the cobol compiler on the box so I will give you this one.
Point 2, This is false. Any exception message will be caught by the monitor, unless the exception is thrown to a higher call stack entry.
Point 3, Ending a job does not produce an exception, thus it can't be caught (Monitored).



Duane Christen


NOTICE: This electronic mail transmission may contain confidential information and is intended only for the person(s) named. Any use, copying, or disclosure by any other person is strictly prohibited. If you have received this transmission in error, please notify the sender via e-mail.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.