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 X-Received: by 10.36.120.211 with SMTP id p202mr7331357itc.43.1518885483723; Sat, 17 Feb 2018 08:38:03 -0800 (PST) X-Received: by 10.157.96.86 with SMTP id v22mr252480otj.10.1518885483636; Sat, 17 Feb 2018 08:38:03 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer02.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!o66no812416ita.0!news-out.google.com!s63ni1646itb.0!nntp.google.com!o66no812406ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 17 Feb 2018 08:38:03 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=75.99.9.146; posting-account=s89PEgoAAABHs2ETFyOrCeTQVQJAfzKq NNTP-Posting-Host: 75.99.9.146 References: <789f6417-5e6f-4d5f-8abb-80246f4f405a@googlegroups.com> <5e5ce844-42a8-c2de-bf53-4acf67be7f53@bahnhof.se> <2bf467d9-dbc1-46e9-981f-a092f82e7271@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5b7b1d2f-5c1a-453b-b5e8-590ff8842b77@googlegroups.com> Subject: Re: GNAT user-specified (via Raise_Exception) warning message size limit From: marciant@earthlink.net Injection-Date: Sat, 17 Feb 2018 16:38:03 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 935113648 X-Received-Bytes: 3307 Xref: reader02.eternal-september.org comp.lang.ada:50494 Date: 2018-02-17T08:38:03-08:00 List-Id: On Saturday, February 17, 2018 at 3:08:35 AM UTC-5, J-P. Rosen wrote: > Le 17/02/2018 =C3=A0 00:22, marc...@earthlink.net a =C3=A9crit : > > Some XML text messages are being parsed "deep" down in a subsystem > > and when a problem is encountered a specific exception is raised and > > the problematic XML text is included in the exception message and > > propagated up a "level" or two of code where it is sometimes parsed > > again and repropagated with additional debugging information. > But why do you put all the message in the exception message? >=20 > Store it in some global structure, where you can handle it any way you > want. Note that it's what you'd do if you wanted to keep information > other than string (assuming you have no issue with concurrency, but then > you could use a task attribute) In the exception message for a few reasons: - The information was always all text (an externally produced structured me= ssage) - The final length was always unknown - All debugging/logging "machinery" was originally designed to expect to on= ly have to simply print out Exception_Information. - For years it had all fit (including full/deep, explicit ObjectAda call tr= ace back debugging information) - Design for portability was never a requirement: The project was supposed = to have been superseded a few times already by (non-Ada) projects that them= selves ended up being cancelled. However, like you suggested, I understand that using a global area (possibl= y indictated by "place-holder" text that is put in the exception message in= stead of the actual text) might be made to work with minimal disruption to = the existing code. Thanks, Vincent Marciante