|
Carel; I use them all the time. I have a condition handler that intercepts an escape message, handles it, and places the relevant information in an error structure (same as IBMs API error struct) and returns that to the caller which then will determine how to deal with the error from the procedure. Depending on your process you can set the error handling up as granular or course as you want/need. You can also create "retry" and "exit" logic using the C functions setjmp/longjmp. You can also imitate the error handling of IBM APIs, pass an error struct and error info will be returned (if one occurs) otherwise the procedure will die hard. If anyone is interested I can get some examples together sometime this week. Duane Christen -----Original Message----- From: Carel Teijgeler [mailto:coteijgeler@xxxxxxxxx] Sent: Tuesday, July 26, 2005 11:28 AM To: rpg400-l@xxxxxxxxxxxx Subject: Re: Ending a program from within a procedure Reading this thread I miss the mentioning of the Condition Handler APIs: CEEHNDLR and CEEHDLU. It has to be registered at the beginning of a programme and unregistered at the end (of course). It requires (a) special procedure(s) to handle errors. You can tell what action to be taken: perculate, promote, etc. Joe Pluta wrote an article in MC on this in 2001. Are those APIs not intended to do what you want to do? Or is it it just one of the many (failed?) attempts to get a decent error handling routine in an RPG programme? Just wondering. Regards, Carel Teijgeler 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 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.