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,820de86ed0dafb8a X-Google-Attributes: gid103376,public From: Richard D Riehle Subject: Re: Help Me Please :) Date: 2000/03/04 Message-ID: <89rlvr$gn9$1@nntp3.atl.mindspring.net>#1/1 X-Deja-AN: 593153752 References: Organization: MindSpring Enterprises X-Server-Date: 4 Mar 2000 18:51:39 GMT Newsgroups: comp.lang.ada Date: 2000-03-04T18:51:39+00:00 List-Id: In article , tmoran@bix.com wrote: >>For example, I think it would be >>very nice to get the information that a certain Program_Error >>exception was caused by a failed Accessibility_Check. >> >>Are other compilers different in this regard? > Yes. Compiler differ a lot in what you get from >Ada.Exceptions.Exception_Information. It has often been noted, by those in the embedded software community, that the features of Ada.Exceptions are not very useful. "Who wants to be passing all those strings around all the time?" In other environments, especially command and control systems, this package is turning out to be useful. I have taken to describing the exception handling event in terms of electrical design. We can overload a circuit and burn down the house. We can install a fuse and prevent the overload from doing its damage. We can design the exception handler as a software circuit-breaker that detects the problem, corrects it, resets itself, and continues on with normal processing. The non-stop characteristics of a command and control system dictate that the exception handling often be designed as a software circuit-breaker rather than a fuse. We see this in many software designs, regardless of language. The problem with Ada is its designation of exceptions as something slightly apart from a typical data type. In some languages, exceptions are first class objects. Ada exceptions are not first class objects for very good reasons. However, it is sometimes useful to promote them to first class objects and benefit from whatever information one can get when the software circuit-breaker is triggered. One way to promote an Ada exception to a first class object is to declare it as an Ada.Exceptions.Exception_Occurrence. A compiler, such as that from Aonix or RR Software, that returns detailed information in a call to the function, Ada.Exceptions.Exception_Information, permits the developer to design a logging module for later review of software circuit-breaker events. In fact, the package is designed to permit an access to an exception occurrence, thereby implying some capabilities one could find very useful in a CCC3I/CCC4I environment. I have decided to include an entire chapter on this topic in the book I have been writing about Object Technology in Ada. It is taking longer to finish this book than I expected because I keep coming up with ideas. I guess we call this "feature creep" in software development. As soon as some publisher says they want to take it "as is" I'll stop and turn it over to them as a first edition. Meanwhile, working on it keeps me out of trouble. Richard Riehle