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=ham 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!news1.google.com!news.glorb.com!wn14feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada Subject: Re: new revision ada From: James Rogers References: <40BDBBFA.2020203@noplace.com> <1087475285.166449@master.nyc.kbcfp.com> <2jlepqF12qbb6U1@uni-berlin.de> Message-ID: User-Agent: Xnews/5.04.25 Date: Tue, 22 Jun 2004 12:45:58 GMT NNTP-Posting-Host: 12.73.184.95 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1087908358 12.73.184.95 (Tue, 22 Jun 2004 12:45:58 GMT) NNTP-Posting-Date: Tue, 22 Jun 2004 12:45:58 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:1773 Date: 2004-06-22T12:45:58+00:00 List-Id: Georg Bauhaus wrote in news:cb927q$332$1@a1-hrz.uni-duisburg.de: > Ada has facilities to implement "trying-out programming". If one > (logical) thread of control fails, and it is important to > collect information about why it failed and in what program > state, than save the relevant pieces of the program state > using the executable statements of a local exception > handler for example. > You can store the information somewhere for lookup, and > use Ada's exceptions, or task communication, or plain > returned values to inform the caller of the failure or > success. The caller can use this information to retrieve > what has been stored for lookup. Your solution detaches the information from the notification. This detachment causes problems, which are compounded by concurrency. If two exceptions are raised in a program and their state information is stored in some buffer such as a protected object, how will a handler determine which state belongs to which exception occurrence? The state information must be directly associated with the exception occurrence. In Java this is done be creating an exception object. References to that object are passed up through the call stack until the exception is handled. I believe the same concept is used in C++ exceptions. Ada has a somewhat different view of exceptions. All exceptions are the same type, and are identified by name. Ada 95 added the ability to define exception information in a limited length string. That string is intimately associated with an exception occurrence. I am proposing that we provide a second kind of exception information using a variable-width string that encodes data in XML. XML is capable of encoding any kind of data including very complex data structures. This new form of exception information will allow complex exception state data to be reliably communicated with an exception occurrence. Jim Rogers