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!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!208.49.83.146.MISMATCH!uns-out.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Structured exception information References: <5e0owbs5cgtv$.kyfgnvskadxd.dlg@40tude.net> From: Stephen Leake Date: Sat, 20 Jan 2007 10:04:07 -0500 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:jJxn+s0NGfC14rntriQTaCf9yi8= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: e594d45b22f69759e00d421607 Xref: g2news2.google.com comp.lang.ada:8362 Date: 2007-01-20T10:04:07-05:00 List-Id: "Dmitry A. Kazakov" writes: > On Fri, 19 Jan 2007 04:47:28 -0500, Stephen Leake wrote: > >> Maciej Sobczak writes: >> >>> Doesn't feel as type-safe as advertised. >> >> But you have not given an actual example where a string is not >> a type-safe solution to the actual problem at hand. >> >> The only example you have given is "present the error to the user". In >> that case, a string is precisely the correct type. > > What about presenting an information necessary for handling the exception > to the handler? Ok, I would still like to see a precise example, not all this hand-waving. > As a practical example, consider mail non-delivery. A returned mail plus > traceback is the information to you, the handler from the exception point. To me, bounced emails are _not_ "exceptional" events in mail handling systems; they are expected, even "normal". As for the failed temperature sensor in another thread, out-of-band status information is a cleaner way to handle this. Can you show some example Ada code for this? And explain why exceptions are better than status for this case? -- -- Stephe