From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Forcing Exception Handling
Date: Wed, 2 Mar 2011 09:28:55 +0100
Date: 2011-03-02T09:28:55+01:00 [thread overview]
Message-ID: <j2ht5siw6hit$.17elexfqk696v.dlg@40tude.net> (raw)
In-Reply-To: ikk1b3$4rq$1@munin.nbi.dk
On Tue, 1 Mar 2011 18:00:32 -0600, Randy Brukardt wrote:
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
> news:3es12u7g6ppm.4lk5iya2a586.dlg@40tude.net...
>> On Mon, 28 Feb 2011 21:54:08 -0600, Randy Brukardt wrote:
> ...
>>> That seems like bad software management to
>>> me. In any case, any such "contracts" in Ada would have to be optional
>>> (for
>>> compatibility reasons), and that might actually help reduce the problems.
>>
>> Unless Storage_Error and Program_Error made manageable contracted
>> exceptions would have only limited use.
>
> I agree; I think that if we go this way all exceptions would have to appear
> in the contract. To make that managable, we'd also need a way to define a
> "set" of exceptions so they could be referred to together. I personally
> think that is sufficient, and it would let the compiler tell you what it
> knows about exceptions being raised.
I thought about sort of conditional exceptions. E.g. storage error possibly
raised when stack has less than n storage units. The compiler should
estimate n in the cases mandated by the ARM. In other cases (recursion etc)
the program is illegal, but the programmer may specify n explicitly using a
pragma (he must know what he's doing, of course).
Another example of conditional exception would be "I don't raise, if you
don't."
And we need a mechanism of exception propagation from slave tasks to their
masters (when the task's exception contract is not null).
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2011-03-02 8:28 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 17:27 Forcing Exception Handling iloAda
2011-02-28 17:32 ` Simon Clubley
2011-02-28 18:33 ` onox
2011-02-28 19:10 ` Simon Clubley
2011-02-28 18:34 ` Vinzent Hoefler
2011-02-28 20:20 ` Florian Weimer
2011-02-28 20:35 ` Ludovic Brenta
2011-03-01 3:54 ` Randy Brukardt
2011-03-01 8:34 ` Dmitry A. Kazakov
2011-03-02 0:00 ` Randy Brukardt
2011-03-02 8:28 ` Dmitry A. Kazakov [this message]
2011-02-28 20:38 ` Georg Bauhaus
2011-03-01 0:19 ` Shark8
2011-03-01 8:56 ` Dmitry A. Kazakov
2011-03-01 9:34 ` iloAda
2011-03-01 9:47 ` Vinzent Hoefler
2011-03-01 9:51 ` Dmitry A. Kazakov
2011-03-01 10:07 ` iloAda
2011-03-01 13:27 ` Mark Lorenzen
2011-03-01 16:11 ` J-P. Rosen
2011-03-02 0:11 ` Randy Brukardt
2011-03-01 15:23 ` Shark8
2011-03-01 15:44 ` Dmitry A. Kazakov
2011-03-02 0:02 ` Randy Brukardt
2011-03-01 2:08 ` Hoàng Đình Long
2011-03-02 13:39 ` ytomino
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox