comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: new revision ada
Date: Tue, 22 Jun 2004 17:17:03 +0200
Date: 2004-06-22T17:17:03+02:00	[thread overview]
Message-ID: <1774424.VSnnNmZCKX@linux1.krischik.com> (raw)
In-Reply-To: Xns951044442A0Ajimmaureenrogers@204.127.36.1

James Rogers wrote:

> Georg Bauhaus <sb463ba@l1-hrz.uni-duisburg.de> 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?

Store them in an booch component map indexed by thread id. I do that in
AdaCL.Trace.

> 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.

Posible only becase Java throws pointers only.

> I believe the same concept is used in C++ exceptions.

With the usual amount of pitfalls which acomplished every C++ feature - yes.

> 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.

Again: why XML when Ada has a perfectly usable system to stream out data.
i.E. 'Input and 'Output. Annex E is allready based on it so it could be
used for extended exceptions as well.

Martin

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




  reply	other threads:[~2004-06-22 15:17 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-31 13:32 Typing in Ada Empit
2004-05-31 14:04 ` Poul-Erik Andreasen
2004-05-31 17:01 ` Jeffrey Carter
2004-05-31 20:03   ` Peter C. Chapin
2004-05-31 22:56     ` tmoran
2004-06-01  1:09       ` Peter C. Chapin
2004-06-01  4:40         ` tmoran
2004-06-01 11:26           ` Peter C. Chapin
2004-06-10  3:01             ` Dave Thompson
2004-06-10  3:00         ` Dave Thompson
2004-05-31 23:22     ` Nick Roberts
2004-06-01  1:04       ` Peter C. Chapin
2004-06-01  2:29         ` Nick Roberts
2004-06-02  4:39         ` Robert I. Eachus
2004-06-02 15:17           ` Hyman Rosen
2004-06-01  2:36       ` Hyman Rosen
2004-06-01  4:27         ` Larry Kilgallen
2004-06-01  4:05           ` Hyman Rosen
     [not found]         ` <d4vnb0tepd4togdrvdrbqpok1ne6n9i2vp@4ax.com>
2004-06-01 14:36           ` Wes Groleau
2004-06-01 20:24         ` Niklas Holsti
2004-06-02  4:43           ` Wes Groleau
2004-06-02  5:28             ` Robert I. Eachus
2004-06-02  8:19               ` tmoran
2004-06-02 14:47               ` Wes Groleau
2004-06-02 11:26             ` Marin David Condic
2004-06-02 14:54               ` gratuitous restrictions (was:Typing in Ada) Wes Groleau
2004-06-02  5:04           ` Typing in Ada Robert I. Eachus
2004-06-01  2:14     ` David C. Hoos
2004-06-02  1:30     ` Jeffrey Carter
2004-06-02 10:53       ` Peter C. Chapin
2004-06-02 11:38         ` Marin David Condic
2004-06-17  2:50           ` Dave Thompson
2004-06-17  4:24             ` James Rogers
2004-06-17 12:28               ` Hyman Rosen
2004-06-17 23:42                 ` James Rogers
2004-06-20 11:27                   ` Nick Roberts
2004-06-20 23:29                     ` new revision ada Brian May
2004-06-21  2:16                       ` tmoran
2004-06-21  2:34                         ` James Rogers
2004-06-22  2:16                           ` Roland Illig
2004-06-22  3:41                             ` James Rogers
2004-06-22  6:53                               ` Martin Krischik
2004-06-21 23:33                         ` Brian May
2004-06-22 20:26                           ` Simon Wright
2004-06-23  0:50                             ` Larry Elmore
2004-06-22 22:06                           ` tmoran
2004-06-21  5:31                       ` Wes Groleau
2004-06-21 12:27                       ` new revision ada (limited with, excpetion handling) Nick Roberts
2004-06-21 13:04                         ` Martin Dowie
2004-06-22 10:38                       ` new revision ada Georg Bauhaus
2004-06-22 12:45                         ` James Rogers
2004-06-22 15:17                           ` Martin Krischik [this message]
2004-06-22 16:09                             ` new revision ada (exception handling) Nick Roberts
2004-06-23  7:55                               ` Pascal Obry
2004-06-23  8:40                                 ` Martin Krischik
2004-06-23 19:33                                   ` Randy Brukardt
2004-06-24  6:57                                     ` Martin Krischik
2004-06-24 21:13                                       ` Randy Brukardt
2004-06-25  8:05                                         ` Dmitry A. Kazakov
2004-06-25 17:28                                           ` Randy Brukardt
2004-06-23  4:31                             ` new revision ada Brian May
2004-06-23 19:47                               ` Randy Brukardt
2004-06-22 16:37                           ` Georg Bauhaus
2004-06-26 14:57                           ` Robert I. Eachus
2004-06-01  1:02 ` Typing in Ada Alexander E. Kopilovich
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox