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



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Simon Coulter
Sent: Thursday, March 06, 2003 8:52 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: monitor for exception by message id

>>In my own stuff, I don't actually throw escape messages to the caller.
>>Rather, I set a return code that the caller needs to inspect.  I stick my
>>return codes in a /COPY member and refer to them via mnemonics rather than
>>by number.  I'm not sure if this helps or not...

>Return codes have their place but in my view the exception model is far
>superior. That is because a return code can be ignored by the caller but an
>exception cannot. Unix is a prime example of an environment where return
>codes are used and frequently never checked because "that error will never
>happen" and "error handling code makes the program slow" and other lame

I dont disagree, but would add that a return code argument can satisfy some
"ignore the return code" concerns.  If the return code is an argument:
   DoSomething( vlu1: vlu2: %addr(RtnCode) ) ;

then *Null can be passed to the proc when the caller wants a hard *escape
message halt in the event of an error.
   DoSomething( vlu1: vlu2: *Null ) ;

Steve



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.