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 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1901f265c928a511 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: new revision ada Date: Tue, 22 Jun 2004 08:53:40 +0200 Organization: AdaCL Message-ID: <1396611.DdypaAbuLE@linux1.krischik.com> References: <2jpj43F12qulvU1@uni-berlin.de> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1087889468 06 23441 TCRbXaCLLdCKwtW 040622 07:31:08 X-Complaints-To: usenet-abuse@t-online.de X-ID: S9a87YZC8e5D3FYSXaljFJtxLQDjLS27jaX1NIm-BifiRTBY0nU5ZM User-Agent: KNode/0.7.7 Xref: g2news1.google.com comp.lang.ada:1763 Date: 2004-06-22T08:53:40+02:00 List-Id: James Rogers wrote: > Roland Illig wrote in news:2jpj43F12qulvU1@uni- > berlin.de: > >> James Rogers wrote: >>> Why not consider all leaving exception messages as strings. >>> Any more complex information can be encoded in the string as an >>> XML message. That message can then be sent by well defined >>> mechanisms from one subprogram to another, one task to another, >>> and across distributed systems. >> >> 11.4.1#18 [Implementation Permissions] >> The string returned by Exception_Message may be truncated (to no less >> than 200 characters) by the Save_Occurence procedure (not the function), >> the Reraise_Occurrence procedure and the re-raise statement. >> >> You didn't want to encode an XML message in 200 characters, did you? :) > > No. I also do not expect that an Ada 95 limit on the length of an > exception message will necessarily be retained for Ada 200X. > For instance, the definition of Exception_Message may be retained > for compatibility, while another kind of message, such as > Extended_Exception_Message may be implemented a new string type > that includes XML encoding and parsing/decoding capabilities. If you are planning for an extension then why not use memory streams instead of strings. For you XML solution you need an XML Parser. 'Input and 'Output are allready there. And you can stream any type you like without the need of an extra parser. The real problem of corse - for both strings and streams is the dynamic length of such a construct. Remember: C++ has: catch (Exception An_Exception) and catch (Exception& An_Exception) catch (Exception* An_Exception) which work very differently. Ada does not have such and such not have such an ambiguous exception handler. And in Java everything is a pointer anyway. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com