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,7d3cb5920e882220 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: 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: <5947aa62-2547-4fbb-bc46-1111b4a0dcc9@x69g2000hsx.googlegroups.com> Date: Fri, 7 Dec 2007 09:54:36 +0100 Message-ID: NNTP-Posting-Date: 07 Dec 2007 09:46:59 CET NNTP-Posting-Host: ca13e140.newsspool1.arcor-online.net X-Trace: DXC=;98VPCAXd0lUoRk[hk2Walic==]BZ:afn4Fo<]lROoRa4nDHegD_]Re?X8WnM?fcagDNcfSJ;bb[eFCTGGVUmh?dLK[5LiR>kgb`4]GCGa5] On Thu, 06 Dec 2007 15:24:44 -0600, tmoran@acm.org wrote: >>Is there any way to force programmers to catch exception that >>your function throws? > Do you mean force them to write code like: > begin > y := func(x); > exception > when funcs_important_exception=>null; -- ignore unimportant exception > end; Semantics of exception handling is a different story. When a contract is satisfied, its implementation can still be incorrect. When "a way to force" reads "exceptions contract", then the answer is no, there is no way, alas. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de