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