From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.1 required=3.0 tests=BAYES_05,NICE_REPLY_A, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: Code flow control Date: Fri, 15 Oct 2021 22:02:46 +0200 Organization: A noiseless patient Spider Message-ID: References: Reply-To: nonlegitur@notmyhomepage.de Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 15 Oct 2021 20:02:47 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="4e896d80284ba48a3e3539e0eb17cf3a"; logging-data="23373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18A8WEvQuePmhdfzudS7fohHookCL+H04A=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 Cancel-Lock: sha1:POmBtRxT6leOx/sWaiTvUFPL32g= In-Reply-To: Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:63013 List-Id: On 15.10.21 20:03, Dmitry A. Kazakov wrote: > On 2021-10-15 19:48, J-P. Rosen wrote: > >> Some people reserve exceptions for signalling errors. I regard them as a way to handle "exceptional" situations, i.e. when the normal flow of control cannot continue. For example, in a deep recursive search, they are handy to stop the recursion and go back to top level when you have found what you were looking for. Some would disagree with that. > > I strongly believe that this is the only consistent way to treat exceptions. Once found, pass the result to the party that needs it. Then, finish the computational task that found the result. Is there anything besides exceptions to do that, and orderly?