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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e136d2bb18e6fb60 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-02 15:21:11 PST Reply-To: "David C. Hoos, Sr." From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada References: <4wOG9.2144$c6.2494@bos-service2.ext.raytheon.com> Subject: Re: A suggestion, completely unrelated to the original topic Date: Mon, 2 Dec 2002 17:21:04 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 216.227.47.49 Message-ID: <3debeae3_4@nopics.sjc> X-Trace: nopics.sjc 1038871267 216.227.47.49 (2 Dec 2002 15:21:07 -0800) Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news-out.newsfeeds.com!propagator2-maxim!news-in.spamkiller.net!telocity-west!DIRECTV!nopics.sjc!not-for-mail Xref: archiver1.google.com comp.lang.ada:31360 Date: 2002-12-02T17:21:04-06:00 List-Id: "Wes Groleau" wrote in message news:4wOG9.2144$c6.2494@bos-service2.ext.raytheon.com... > When I see something like: > > > exception > > when A: Ada.Io_Exceptions.Status_Error => > > T_Io.Put_Line("Status_Error in Char_Sets_Test."); > > T_Io.Put_Line(Ada.Exceptions.Exception_Information(A)); > > when O: others => > > T_Io.Put_Line("Others_Error in Char_Sets_Test."); > > T_Io.Put_Line(Ada.Exceptions.Exception_Information(O)); > > I generally think it would be easier to use: > > exception > when E : others => > T_Io.Put_Line(Ada.Exceptions.Exception_Name(E) & > " in Char_Sets_Test."); > T_Io.Put_Line(Ada.Exceptions.Exception_Information(E)); > Exception_Information repeats the Exception_Name if the implementation advice is followed, so explicitly outputting the name is probably redundant. I think it's also good practice to write information about exceptions to the Standard_Error file instead of the Standard_Output, as this makes it easier for the execution environment (e.g., a shell) to separate exception information from normal output. Just my $0.02 worth