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=1.0 required=3.0 tests=BAYES_40,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.6 X-Received: by 2002:a0c:ef4b:: with SMTP id t11mr11766084qvs.48.1634310523075; Fri, 15 Oct 2021 08:08:43 -0700 (PDT) X-Received: by 2002:a5b:846:: with SMTP id v6mr12435579ybq.457.1634310522888; Fri, 15 Oct 2021 08:08:42 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 15 Oct 2021 08:08:42 -0700 (PDT) Injection-Info: google-groups.googlegroups.com; posting-host=92.40.203.39; posting-account=5K6RMgoAAADQeoHIOMi2dg5aYc0IVxGi NNTP-Posting-Host: 92.40.203.39 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Code flow control From: Kevin Chadwick Injection-Date: Fri, 15 Oct 2021 15:08:43 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:63008 List-Id: Although surprised that pragma No_Exception_Propagation seems to prevent ac= cess to some exception information. I am happy with Adas exception mechanis= m. I have read that exceptions should not be used for code flow. For Ada after perusing various threads on this mailing list around best pra= ctice I am considering using exceptions locally but also have an in out var= iable for code flow control at the point of use. Is that the way with the c= aveat that it all depends on the task at hand? In Go with vscode a static checker will warn if an error type variable is r= eturned without a following if error utilisation (check usually of the form= if err /=3D nil). I have read that Spark has some kind of static analysis to achieve similar = as it forbids exceptions. It is not the end of the world but is there any static analyser that could = do similar for Ada. IOW save me some time or perhaps worse whenever I have = simply omitted the check by accident, in haste or distraction. I'm sure I could quickly write a shell script easily enough for a specific = design as in if keyword appears once but not again within x lines then shou= t at me but I am wondering if I am missing a tool or better practice before= I do so?