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-Thread: 103376,61e9062c1f23b9d5 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!217.73.144.44.MISMATCH!ecngs!feeder.ecngs.de!news.osn.de!diablo2.news.osn.de!news.belwue.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: contracted exceptions Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1181165630.012508.55290@i38g2000prf.googlegroups.com> <19fxsxv1god43$.1pqq8vgfu2itn$.dlg@40tude.net> Date: Fri, 8 Jun 2007 20:00:59 +0200 Message-ID: NNTP-Posting-Date: 08 Jun 2007 20:00:40 CEST NNTP-Posting-Host: 509e9d23.newsspool2.arcor-online.net X-Trace: DXC=iCKFN8bGD[9D]ncZ]`hZ;1A9EHlD;3Yc24Fo<]lROoR18kF[ On Fri, 08 Jun 2007 17:31:05 GMT, Ray Blaak wrote: > Note that by "contract" I am referring only to some imaginary Ada syntax that > indicates that a subprogram can raise a particular set of exceptions. Then I don't see any problem with that. Consider: if Halt (x) then raise Y; end if; the contract has Y. So you can always match such contracts statically. Of course, Raise_Exception and Raise_Occurence from Ada.Exceptions will have all exceptions in their contracts. > Hm. I'm not so sure there is a disagreement as such with fault vs error. I > guess that my point is that what the software does in response to both tends > to be the same: report it and reset/halt/whatever. Software and more narrowly exceptions cannot report own bugs. It would be a very bad idea to exceptions for that, because vital information about the reasons will be inevitably destroyed. The best possible way is to break into debugger, stopping everything else. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de