Re: Common exception handling
- From: Georg Bauhaus <rm.dash-bauhaus@xxxxxxxxxxxxx>
- Date: Wed, 27 Aug 2008 11:20:12 +0200
Maciej Sobczak schrieb:
On 26 Sie, 21:14, "Dmitry A. Kazakov" <mail...@xxxxxxxxxxxxxxxxx>
wrote:
I wished to have ranges of exceptions
Hierarchies, not ranges.
The difference is that entities in the hierarchy can be not only
extended but also specialized and that would nicely fit in the OO part
of the language.
Meanwhile, using a nested programming language,
we can do
type Throwable is tagged private;
...
procedure Outer is
Fail: exception;
package OO_Exception is
type Relevant_Info is new Throwable with
-- everything needed to known what
-- has happened deep down the call chain
record
...
end record;
procedure Prim_Op(Recording: Relevant_Info);
end OO_Exception;
package body OO_Exception is separate;
use OO_Exception;
procedure Inner is
begin
...
end Inner;
Scrap_Book: Relevant_Info;
begin
Inner;
exception
when Fail =>
Prim_Op(Scrap_Book);
end Outer;
--
Georg Bauhaus
Y A Time Drain http://www.9toX.de
.
- References:
- Common exception handling
- From: shaunpatterson
- Re: Common exception handling
- From: shaunpatterson
- Re: Common exception handling
- From: Adam Beneschan
- Re: Common exception handling
- From: Dmitry A. Kazakov
- Re: Common exception handling
- From: Maciej Sobczak
- Common exception handling
- Prev by Date: Re: Common exception handling
- Next by Date: Re: Failure integrating .NET GPL version of GNAT into Visual Studio 2005
- Previous by thread: Re: Common exception handling
- Next by thread: Re: Common exception handling
- Index(es):
Relevant Pages
|