From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a83c46b54bacb7f6 X-Google-Attributes: gid103376,public From: "Mike Silva" Subject: Re: JOB:Sr. SW Engineers Wanted-Fortune 500 Co Date: 2000/02/04 Message-ID: #1/1 X-Deja-AN: 581725057 References: <3894A823.92EC75D1@bondtechnologies.com> <874b7r$mj9$1@nnrp1.deja.com> <38967537_1@news.jps.net> <2000Feb1.153921.1@eisner> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Complaints-To: news@wenet.net X-Trace: news.wenet.net 949707930 206.169.137.33 (Fri, 04 Feb 2000 15:45:30 PST) NNTP-Posting-Date: Fri, 04 Feb 2000 15:45:30 PST Newsgroups: comp.lang.ada Date: 2000-02-04T00:00:00+00:00 List-Id: Since nobody else has answered your question I didn't want to let it go without a try. The general approach, whether via built-in or hand-coded exception handling, is to try to continue to supply best-guess results. If you think of a given chunk of software as a black box with some input, some output, and a red "Exception!" light on it, the idea is that when the red light goes on you try to stick something useful in the output even if you don't know where in the box the problem lies. This something useful could be predetermined data, or previous-pass data, or perhaps data from another process which is good enough to limp along on. Or perhaps you switch to another mode which doesn't require the output of the failed "box". At the same time you can try to re-initialize any hardware associated with the box (e.g. I've seen LCD displays that sometimes go out to lunch and need to be coaxed back into a working electrical state via re-initialization). The possibilities are endless, depending on the hardware and the software functional breakdown, but quite often you can think of something useful to do, especially in the short term (in the case that the hardware just had a momentary hiccup). To extend the safety belt analogy, you add collapsible steering columns and safety glass windows even though the safety belt will never allow you to hit the wheel or the windows. Mike Hyman Rosen wrote in message ... >kilgallen@eisner.decus.org (Larry Kilgallen) writes: >> And some small fraction of automobile collision victims who are not wearing >> safety belts are "thrown clear". Exceptional cases do get more press. > >I am clearly in need of enlightenment, so please explain to me. After >you have decided that a given situation is impossible, will you >nevertheless add an error handler for that impossible situation, so >that if it happens anyway, you can recover gracefully? To what level >of detail and impossibility will you go? When you write Ada code, how >many exception handlers for Program Error do you put into your code?