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,631686271a29a357 X-Google-Attributes: gid103376,public From: gauthier@unilim.fr (Michel Gauthier) Subject: Re: Common Error/Exception Handler Date: 1996/04/24 Message-ID: #1/1 X-Deja-AN: 151175129 references: <4l8d5i$31g@news.sanders.lockheed.com> organization: Universite de Limoges newsgroups: comp.lang.ada Date: 1996-04-24T00:00:00+00:00 List-Id: In article <4l8d5i$31g@news.sanders.lockheed.com>, John Cupak wrote: >> I have observed that non-Ada programmers tend to create a "constant" error >> number header file or package, and then use that constant to write/display the >> corresponding error message. Ada programmers, however, tend to use "packaged" >> exceptions, raise the exception where/when appropriate, and "handle" the >> exception in an exception handler. I apologize for having answered to a reply before receiving the original posting. Ada programmers tend (sensibly?) to encapsulate. For exceptions, this takes the form that you evoke. The underlying concept is reporting, and both cases are possible implementations, among others. >> Wouldn't it be possible with the Ada 95 exception mechanisms to create a >> package of standard exceptions and a common error message procedure, >> import/rename the exceptions where appropriate, and let the common error >> message procedure take care of the details? I guess it useful to insist on my first reply : the predefined package Ada.Exceptions provides all the features you wish, or features that permits building what you wish. Fortunately, the mechanism is flexible enough for people who would prefer other uses of exceptions. For additional information, see my paper in Ada Letters about Ada95 exceptions. FUNDAMENTAL QUESTION : is tracing of exceptions really useful ? ---------- ---------- ---------- ---------- Michel Gauthier / Laboratoire d'informatique 123 avenue Albert Thomas / F-87060 Limoges telephone +33 () 55457335 [or ~ 7232] fax +33 () 55457315 [or ~7201] ---------- ---------- ---------- ---------- La grande equation de la fin du siecle : windows-X = Mac-Y The main end-of-century equation : windows-X = Mac-Y ---------- ---------- ---------- ---------- Si l'an 2000 est pour vous un mysticisme stupide, utilisez la base 9 If you feel year 2000 a stupid mystic craze, use numeration base 9 ---------- ---------- ---------- ----------