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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?B?QmrDtnJuIEx1bmRpbg==?= Newsgroups: comp.lang.ada Subject: Re: How to get nice with GNAT? Date: Sun, 23 Nov 2014 19:06:55 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 23 Nov 2014 18:05:20 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="423cdff4a8e9a3019f180d50ec7a3ccb"; logging-data="12542"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19tYCosK+WJ8zdYJWVpMkGw" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 In-Reply-To: Cancel-Lock: sha1:NPMLQRopkR9QsqTOn0TBVKK88gA= Xref: news.eternal-september.org comp.lang.ada:23667 Date: 2014-11-23T19:06:55+01:00 List-Id: On 2014-11-22 23:44, brbarkstrom@gmail.com wrote: > > One possibility is to get in the habit of putting exception handling > messages in every procedure interface, as in > > procedure DoSomething(stuff; > OK : out Boolean; > Err_Msg : out Bounded_String); > > if DoSomething throws an exception, the calling program can detect > that OK is false and receive a message identifying the cause. To me, it sounds like c-programming. Check the result after each call, because of the lack of exceptions. But this is Ada where exceptions should be dealt with as is. Much easier to read, better program flow. And the OP did not want to get rid of exceptions, just get reasonable crash-dumps. -- Björn