|
Hello Buck, You wrote: >Well, sort of. The way most OS/400 processes do this is to send up some >diagnostics, then the escape message. It's up to the message handler to >read the diagnostics. I understand where you're coming from: it isn't the >same as other platforms. That's because the AS/400 is better than the other platforms. The exception message model is a very advanced way of interacting between caller and callee. We've had it for over 30 years. Smalltalk has it, C++ stole it and Java cloned it. Like so much of what the AS/400 has, it doesn't get any credit for it because it's different from what others do. Different <> Wrong. Different -> Better. >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 Unix-weenie excuses. An exception model forces the caller to deal with the error. Of course they can simply monitor and ignore (like MONMSG CPF0000) but that requires an overt action on the part of the caller rather than an error of omission. The exception model is certainly more expensive than the return code model (both in terms of programmer skill and system resources) but, like most things, you get what you pay for. Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 mailto: shc@xxxxxxxxxxxxxxxxx \ / X ASCII Ribbon campaign against HTML E-Mail / \ --------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.
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.