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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.67.7.232 with SMTP id df8mr53926535pad.34.1435182338070; Wed, 24 Jun 2015 14:45:38 -0700 (PDT) X-Received: by 10.140.85.11 with SMTP id m11mr656613qgd.29.1435182338020; Wed, 24 Jun 2015 14:45:38 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!j8no885425igd.0!news-out.google.com!4ni2668qgh.1!nntp.google.com!q107no3141891qgd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 24 Jun 2015 14:45:37 -0700 (PDT) In-Reply-To: <9b539536-f385-434d-ad0c-a48e8877e23b@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.36; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.36 References: <9894cde7-2cf8-4060-be65-857812ad7b09@googlegroups.com> <17436268-aceb-461f-bdcf-eee8436cd0e6@googlegroups.com> <86y4jaqzdx.fsf@stephe-leake.org> <01ac6d30-fa93-4868-aa31-3dbec93e9a21@googlegroups.com> <9b539536-f385-434d-ad0c-a48e8877e23b@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <99d819fa-148e-4e20-b7e1-c509b16ca093@googlegroups.com> Subject: Re: What do you think about this? From: Anh Vo Injection-Date: Wed, 24 Jun 2015 21:45:38 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:26461 Date: 2015-06-24T14:45:37-07:00 List-Id: On Wednesday, June 24, 2015 at 2:06:05 PM UTC-7, Laurent wrote: > On Wednesday, 24 June 2015 07:57:51 UTC+2, Anh Vo wrote: > > > In addition, "pragma Assertion_Policy (Check);" should be added at the top of the package. This >pragma has the same effect as switch -gnata under GNAT. Of course, all compiler must comply with >pragma Assertion_Policy. > > Ah ok now I can see a difference. At least now I get additional info where the problem comes from. Instead of "Oops error" That is exactly the intention. Here is another beauty. With GNAT, add the following exception handler to your main procedure. Make sure to pass switch -E to your build option. Thus, debugger is rarely needed. with Gnat.Traceback.Symbolic; use Gnat; --... exception when Err : others => Put_Line ("Houston we have a problem: " & Exceptions.Exception_Information(Err)); Put_Line (Traceback.Symbolic.Symbolic_Traceback(Err)); > Thanks. You are quite welcome.