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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public X-Google-Thread: fac41,9a0ff0bffdf63657 X-Google-Attributes: gidfac41,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public From: ell@access.digex.net (Ell) Subject: Re: Software landmines (loops) Date: 1998/09/04 Message-ID: <35f1fd46.56901219@news.erols.com>#1/1 X-Deja-AN: 387852598 Content-Transfer-Encoding: 7bit References: <6sbuod$fra$1@hirame.wwa.com> <35f51e53.48044143@ <904556531.666222@miso.it.uq.edu.au> <6sgror$je8$3@news.indigo.ie> <6sh3qn$9p2$1@hirame.wwa.com> <6simjo$jnh$1@hirame.wwa.com> <6sjk3p$4tc$1@hirame.wwa.com> <6skgn4$3gq$1@hirame.wwa.com> <6sm6md$3fh$1@hirame.wwa.com> <35f1375e.6237208@news.erols.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@rcn.com X-Trace: winter.news.erols.com 904920824 22521 207.172.119.216 (4 Sep 1998 14:53:44 GMT) Organization: Universe Mime-Version: 1.0 Reply-To: ell@access.digex.net Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-09-04T00:00:00+00:00 List-Id: "Robert Martin" wrote: [ In reference to the idea of testing for pre-conditions before processing, RCM, in part, said the following: ] >Consider this, would you prefer that catch statements *precede* try blocks? > >catch(memerr) >{ >} >catch(fileerr) >{ >} >try >{ >} Testing for pre-conditions before processing is not equal to what the try/catch idiom is about. 'catch' is about catching *exceptions* which occur *within* 'try' processing. It is not about testing *pre-conditions* to what is necessary for successfully processing in a block. The difference is that exceptions in processing may legitimately occur even though pre-conditions for processing have been met. N'est ce pas? Elliott