|
I guess what I had in mind was an application I have in which any I/O errors are logged, and then an email is sent to me, and then the user is notified about it and then the application is shut down. Works nicely, but only handles I/O errors. Everything else gets the normal exception handling which isn't so gentle. > -----Original Message----- > From: bmorris@ca.ibm.com [SMTP:bmorris@ca.ibm.com] > Sent: Friday, February 22, 2002 12:11 PM > To: rpg400-l@midrange.com > Subject: RE: Cancel & Condition Handlers (was: File update after > abnormal program termination) > > > >From: "Smith, Nelson" <NSmith@lincare.com> > >Date: Fri, 22 Feb 2002 10:24:31 -0500 > Reply-To: rpg400-l@midrange.com > > > >Has anyone implemented a generic or set of Cancel and/or Condition > Handlers > >to use across an entire application and what would such an animal look > like= > >? > >Is there a list somewhere of all possible conditions a handler can > handle? > >I know, RTFM. At this point it's just a general question, not a real > >project I'm getting into. > > Nelson, if by "handle" you mean "make it go away", then for a generic > condition handler (or any condition handler for that matter) the list > of conditions it can handle should be empty, in my opinion. It can be > dangerous to handle conditions with an ILE condition handler, because > it causes the failing procedure to continue at the next MI instruction > rather than the next HLL instruction. If this is a "store" instruction, > you now have bad data in the target variable. The scariest part of > going to the next MI instruction is that what instruction is next can > change from release to release or even PTF to PTF, and what may be > benign one day can be destructive the next. > > Safe things for condition handlers to do are > - look at the condition and do some cleanup or reporting tasks, but > then let the language's exception handling take over > - as above, but also promote (change) the exception into something > else (maybe your own message with nicer wording) > > Condition handlers are called for any exception (escape, notify and > status), so there's probably no list of conditions they can handle. > > Barbara Morris > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. ************************************************************************************************************************************************************************************************************ This message originates from Lincare Holdings Inc. It contains information which maybe confidential or privileged and is intended only for the individual or entity named above. It is prohibited for anyone else to disclose, copy, distribute or use the contents of this message. All personal messages express views solely of the sender, which are not to be attributed to Lincare Holdings Inc., and may not be copied or distributed without this disclaimer. If you received this message in error, please notify us immediately at MailAdmin@lincare.com or (800) 284-2006. ************************************************************************************************************************************************************************************************************
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.