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!reader02.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: GNAT user-specified (via Raise_Exception) warning message size limit Date: Sat, 17 Feb 2018 08:15:01 +0100 Organization: Adalog Message-ID: References: <789f6417-5e6f-4d5f-8abb-80246f4f405a@googlegroups.com> <5e5ce844-42a8-c2de-bf53-4acf67be7f53@bahnhof.se> <2bf467d9-dbc1-46e9-981f-a092f82e7271@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 17 Feb 2018 08:08:34 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="c67cc3a5f8e1a9b218ad34ef20839ec1"; logging-data="9794"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18USG6Rn6C3+1MxcOl103/A" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: Content-Language: fr Cancel-Lock: sha1:zrH/3ox/XMhtLXakAPc2AtiLe30= Xref: reader02.eternal-september.org comp.lang.ada:50481 Date: 2018-02-17T08:15:01+01:00 List-Id: Le 17/02/2018 à 00:22, marciant@earthlink.net a écrit : > 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? 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) -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr