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: a07f3367d7,c80e6f742e73478f X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!f8g2000yqn.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Ensuring postconditions in the face of exceptions Date: Mon, 15 Mar 2010 01:56:05 -0700 (PDT) Organization: http://groups.google.com Message-ID: <5c8e9880-0ff0-4f8b-9dcc-bfde11a2de41@f8g2000yqn.googlegroups.com> References: <820d96c0-5d67-4b8c-8c5b-811ca4f1127e@g26g2000yqn.googlegroups.com> <8990d686-f703-4e9c-91b7-32410289983d@g11g2000yqe.googlegroups.com> <87ljdv56gy.fsf@ludovic-brenta.org> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1268643365 27927 127.0.0.1 (15 Mar 2010 08:56:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 15 Mar 2010 08:56:05 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f8g2000yqn.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:10539 Date: 2010-03-15T01:56:05-07:00 List-Id: Jeffrey R. Carter wrote on comp.lang.ada: > Ludovic Brenta wrote: > > > That's an interesting suggestion but we've patched the run-time library > > so that it dumps core on every exception; we use exceptions only for > > exceptional situations and dumping core freezes the system for 30 > > seconds to produce a file roughly 300 MiB in size. =A0So I would rather > > not raise exceptions that are do not detect a bug. > > Let me see if I understand this correctly: Visit raises an exception, whi= ch > freezes the system for 30 s and writes a large file. Then you handle the > exception, assign to Dirty, and re-raise the exception, again freezing th= e > system and writing the file. > > Is that how this is expected to work? Not exactly because we've taken this situation into account when patching the run-time library. It dumps core on the first exception but not on re-raises, so re-raises are OK. -- Ludovic Brenta.