comp.lang.ada
 help / color / mirror / Atom feed
* Code flow control
@ 2021-10-15 15:08 Kevin Chadwick
  2021-10-15 17:48 ` J-P. Rosen
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Kevin Chadwick @ 2021-10-15 15:08 UTC (permalink / raw)


Although surprised that pragma No_Exception_Propagation seems to prevent access to some exception information. I am happy with Adas exception mechanism. I have read that exceptions should not be used for code flow.

For Ada after perusing various threads on this mailing list around best practice I am considering using exceptions locally but also have an in out variable for code flow control at the point of use. Is that the way with the caveat that it all depends on the task at hand?

In Go with vscode a static checker will warn if an error type variable is returned without a following if error utilisation (check usually of the form if err /= 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 shout at me but I am wondering if I am missing a tool or better practice before I do so?

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-11-26 13:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 15:08 Code flow control Kevin Chadwick
2021-10-15 17:48 ` J-P. Rosen
2021-10-15 18:03   ` Dmitry A. Kazakov
2021-10-15 19:19     ` Kevin Chadwick
2021-10-15 20:02     ` G.B.
2021-10-15 21:30       ` Kevin Chadwick
2021-10-15 22:51         ` Randy Brukardt
2021-10-16  7:50       ` Dmitry A. Kazakov
2021-10-16 13:26         ` Kevin Chadwick
2021-11-26 13:44           ` Kevin Chadwick
2021-10-15 17:53 ` Jeffrey R. Carter
2021-10-15 23:30 ` Roger Mc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox