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,1901f265c928a511 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.gbronline.com!news.gbronline.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 21 Jun 2004 00:30:23 -0500 Date: Mon, 21 Jun 2004 00:31:16 -0500 From: Wes Groleau Reply-To: groleau+news@freeshell.org Organization: Ain't no organization here! User-Agent: Mozilla Thunderbird 0.5 (Macintosh/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: new revision ada References: <40BDBBFA.2020203@noplace.com> <1087475285.166449@master.nyc.kbcfp.com> <2jlepqF12qbb6U1@uni-berlin.de> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 69.9.86.128 X-Trace: sv3-eb2r5GhIt4Yu301V1YctYTKO2kbdH+Jh9hfO0dcO1UndYA/6apF01GljSVI7YgFwSBpmJgLUcI19z5L!SiD4Le/YA822I4E9tDKReaIVlN9QtTTG0wT5V5aJB+oP/e+qaYEfQ27Vd+gXpvT6eG8ctXH1phZK!Dw== X-Complaints-To: abuse@gbronline.com X-DMCA-Complaints-To: abuse@gbronline.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: g2news1.google.com comp.lang.ada:1722 Date: 2004-06-21T00:31:16-05:00 List-Id: Brian May wrote: > compared with, say Java exceptions (as functions declare what > exceptions they can raise, and can pass more information in the > exception instead of just a string). Well, a String can effectively carry ANY information. But I agree Java is a little more flexible in exceptions. However, the "throws" clause seemed like a good idea, but turns out to be a major pain in large systems sometimes. one example: Was getting a null pointer exception (can't remember the Java name for that). Took a long time to chase down to two bugs. When one class was fed the wrong file name, instead of throwing file not found, it just acted like end-of-file to another class. And that class, not finding the item searched for, returned a null pointer instead of an empty string for the value. Fixing the first bug by throwing FileNotFound required chasing all over the (large) system adding in the throws clause for it. In Ada, when you add a raise at a low level, you only have to add the handler. You don't have to tweak every unit in the call chain. Moral of the story: One guy's relatively minor error caused a heck of a lot of work for the other guy who had to fix it. -- Wes Groleau He that complies against his will is of the same opinion still. -- Samuel Butler, 1612-1680