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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC 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!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Thu, 30 Jul 2015 16:13:54 +0200 Organization: cbb software GmbH Message-ID: <1voiopokwu6uk.16sv2apmjfgu6$.dlg@40tude.net> References: <2df4698f-4c8e-457c-822d-209cb2f8ab5e@googlegroups.com> <014427b1-ff7a-4a69-82e6-0330af77ed96@googlegroups.com> <91f88d79-197c-419f-84a8-908e05967a2c@googlegroups.com> <135c2b00-d13c-4f5d-a586-8aca442d363b@googlegroups.com> <947bb170-91aa-4e99-810e-7154be9bae6a@googlegroups.com> <8a0dc4af-83dc-4f24-b5ac-51ffce5bb1b0@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: ChlmA4XFxcJoDoqGdDSflw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:27213 Date: 2015-07-30T16:13:54+02:00 List-Id: On Thu, 30 Jul 2015 06:51:48 -0700 (PDT), EGarrulo wrote: > On Thursday, July 30, 2015 at 3:30:53 PM UTC+2, Dmitry A. Kazakov wrote: >> On Thu, 30 Jul 2015 06:00:11 -0700 (PDT), EGarrulo wrote: >>> Basically, each exception in the chain answers the >>> question "why?" Now, if you report only one of those >>> exceptions, then you lose context. This is why you should >>> be able to chain exceptions. Of course, you could achieve >>> a similar result by concatenating messages, but this way >>> you would be performing manually what the language should >>> have performed automatically. >> >> exception >> when Error : Chain_Error => >> raise Chain_Error with "Worse than " & Exception_Message (Error); >> end; > > Ehm... That is exactly what I had said. Thanks for your > confirmation. But I wonder whether chaining strings could > lead to an "Out of memory" error in Ada. It should not, at least not for this reason, because the exception message length is bounded. You get the message truncated if it becomes too large. But the idea of exception stack trace does not make much sense, except when debugging. ------------------- GNAT provides stack traces at run time. You can have a symbolic trace back down to the individual source lines. [This does not work on some platforms, though. Which is the reason why it is not a language feature. The implementation burden would be too high for some small microcontroller] -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de