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,c4bd2a19251049b1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: best practice: error handling Date: Tue, 31 May 2011 23:40:50 +0200 Organization: cbb software GmbH Message-ID: <1lkqiegcopy14.xdaiapub2p5g.dlg@40tude.net> References: <0b95a2a1-6e3d-4ad1-a832-e3099a9bce37@v8g2000yqb.googlegroups.com> <1ulcworf418ai$.iy0mm08iuusy.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: O7DMLAfvhLCkMlpctt8QmQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:19602 Date: 2011-05-31T23:40:50+02:00 List-Id: On Tue, 31 May 2011 13:35:22 -0700, Jeffrey Carter wrote: > On 05/31/2011 01:02 PM, Dmitry A. Kazakov wrote: >> >> Again, the point is valid, but the example is not good. Zero index is as >> good as Index_Result. In both cases an attempt to use the index will cause >> an exception. So both return an "invalid index." > > Hardly. Some valid and fairly common uses include getting the part of Source > before or after Pattern, both of which can succeed with an invalid result with > an index of zero. A good point. Agreed. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de