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-Thread: 103376,7d3cb5920e882220 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Exceptions Date: Thu, 13 Dec 2007 20:36:00 -0600 Organization: Jacob's private Usenet server Message-ID: References: <5947aa62-2547-4fbb-bc46-1111b4a0dcc9@x69g2000hsx.googlegroups.com> <475c688f$0$17524$9b4e6d93@newsspool4.arcor-online.net> <4dae26fe-0c8a-46e1-9a33-43c18cf757ae@i3g2000hsf.googlegroups.com> <9f16235c-260a-460b-873c-2183c154cc0c@e25g2000prg.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1197599544 3019 69.95.181.76 (14 Dec 2007 02:32:24 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 14 Dec 2007 02:32:24 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 Xref: g2news1.google.com comp.lang.ada:18936 Date: 2007-12-13T20:36:00-06:00 List-Id: "Ray Blaak" wrote in message news:u4pem6r3t.fsf@STRIPCAPStelus.net... ... > Mind you, with the use of a non-garbage collected language like Ada, one would > need to do cleanups with exceptions more often, but that does not imply the > need to do specific exception handling. I generally agree with you, but there is one case where you need to do specific exception handling: when you need to change one exception into another. For instance, the specification for Ada.Text_IO says that a Get of an integer that is out of range raises Data_Error. If you write that code in Ada (and I think most of us implementers did), you probably had to handle Constraint_Error somewhere and then raise Data_Error instead. I find that this sort of handler is fairly common if you use user-defined exceptions in your packages. Randy. P.S. Ada programmers *raise* exceptions. The only thing that Ada programmers "throw" is the trash into the trash can... ;-)