Re: Structured exception information
- From: Robert A Duff <bobduff@xxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 20 Jan 2007 11:33:51 -0500
Stephen Leake <stephen_leake@xxxxxxxxxxxxxxxx> writes:
But I don't understand _why_ you want to do that in the exception
handler. Why didn't the callee look up the error code, and put the
string in the exception message?
The same reason the callee doesn't print the string out and/or terminate
the program. "Separation of concerns" is the appropriate buzzword.
1) Define structured exceptions in Ada. We _know_ that _all_ compilers
will not meet the standard in some way, and each in different ways.
I'm confused by that statement. Are you merely saying that "compilers
have bugs"? It's (sadly) true, but that's not a valid criticism of this
particular feature. Or are you saying there's something specific about
the "exceptions as objects" feature we're discussing that makes it hard
(impossible?!) to implement, and therefore buggy?
I (think I) know how to implement this feature. What are the
implementation difficulties you perceive? I've heard some vague talk
about tasks and distributed systems -- but I still don't see the
problem(s).
It's certainly more difficult to implement data attached to
exceptions, compared to the Ada 83 feature, where an exception can be
represented as a fixed-size (one word) compile- or link-time-known
quantity. Managing variable sized things is definitely harder.
But I fail to see how exceptions with Strings attached (he he)
is easier to implement than exceptions with arbitrary (typed) data
attached.
- Bob
.
- Follow-Ups:
- Re: Structured exception information
- From: Stephen Leake
- Re: Structured exception information
- References:
- Structured exception information
- From: Maciej Sobczak
- Re: Structured exception information
- From: Stephen Leake
- Re: Structured exception information
- From: Maciej Sobczak
- Re: Structured exception information
- From: Stephen Leake
- Re: Structured exception information
- From: Maciej Sobczak
- Re: Structured exception information
- From: Stephen Leake
- Re: Structured exception information
- From: Maciej Sobczak
- Re: Structured exception information
- From: Stephen Leake
- Structured exception information
- Prev by Date: Re: Structured exception information
- Next by Date: Re: Translating an embedded C algorithm
- Previous by thread: Re: Structured exception information
- Next by thread: Re: Structured exception information
- Index(es):
Relevant Pages
|