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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,699cc914522aa7c4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Structured exception information Date: Sat, 20 Jan 2007 11:33:51 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1169310834 20622 192.74.137.71 (20 Jan 2007 16:33:54 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 20 Jan 2007 16:33:54 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:860MkwCWfuAfKqMSeILyXgzF4gE= Xref: g2news2.google.com comp.lang.ada:8366 Date: 2007-01-20T11:33:51-05:00 List-Id: Stephen Leake 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