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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Last chance handler on a PC Date: Fri, 31 Jan 2020 08:00:05 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 31 Jan 2020 07:00:05 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="d4d16e8852b3895473d64814eb56afed"; logging-data="9731"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18doWJu+35lqMV6so0VQeNjs6yuatLr4VA=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Cancel-Lock: sha1:fUn5EJYgklBU1YtDbZuJzhodnBc= In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:57997 Date: 2020-01-31T08:00:05+01:00 List-Id: On 1/31/20 6:53 AM, J-P. Rosen wrote: > Le 30/01/2020 à 20:27, ahlan@marriott.org a écrit : >> Very interesting but we want to catch all unhandled exceptions, specifically those raised during package elaboration. >> > Ah, OK now I see the problem. You'll need to have an exception handler > in every package body, but be careful about elaboration order! This only handles exceptions in the executable part of the pkg. To handle exceptions in the declarative part of pkgs, you need to have set a termination handler for the environment task. -- Jeff Carter "[I]t is easy to use [Ada] just like any other language: using only predefined types, using packages just for separate compilation (without any consideration for information hiding), ignoring generics altogether, etc. I have seen projects doing this; they didn't get much gain from using Ada, and spent a lot of time fighting the compiler." Jean-Pierre Rosen 165