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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,319ef0454c7765d5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-24 13:52:22 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!paperboy.wellfleet.com!noc.near.net!inmet!spock!stt From: stt@spock.camb.inmet.com (Tucker Taft) Subject: Re: Why no exception hierarchy ? Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. X-Newsreader: TIN [version 1.1 PL8] References: Date: Fri, 24 Mar 1995 21:52:22 GMT Date: 1995-03-24T21:52:22+00:00 List-Id: Michel Gauthier (gauthier@unilim.fr) wrote: : In article <3ksv4s$f9e@news.uni-c.dk>, mojemj@unidhp.uni-c.dk (Mogens : Jensen) wrote: : >> [...] : >> : >> As OOP has been built into the language, class hierarchies/libraries will : >> be built (or transferred from C++, maybe?); and these will probably throw : >> exceptions. : >> As far as I can see, a hierarchy of exceptions would help a lot in such : >> a library. : >> : >> What is the rationale for this (I couldn't find it in either the AARM or : >> the Rationale). : I cannot answer about the rationale for this, Early versions of Ada 9X included exception hierarchies. However, it was eliminated in favor of being able to pass information along with an exception. It is possible to create an incredibly elaborate exception facility, but the truth is, exceptions are mostly used for nearly fatal errors, or at least errors that are handled by resetting to some well-defined state. In these cases, you mostly want a dump of (human-readable) information to log in an error file or report to the user. Having lots of fine distinctions between different exceptions and lots of different exception handlers is probably overkill. Similarly, exception "signatures" for subprograms are overkill, in my view. They sound great in theory, but in practice, any fault tolerant system will end up having to have a handler for "others" anyway, if only to handle the case when a subprogram violates its exception signature ;-). The test is to write a large system using exception hierarchies, exception signatures, etc. Do these features really make the system more robust, or do they just add to the complexity and hence make the system less robust? : Michel Gauthier - Laboratoire d'informatique - 123 avenue Albert Thomas : F-87060 Limoges - fax +33()55457315 : ----- Are the messages that objects exchange also objects ? ----- -Tucker Taft stt@inmet.com Intermetrics, Inc.