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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2d2df3e9ad18fa63 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-21 12:42:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed!wn13feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: ISO/IEC 14519 - Ada POSIX binding References: <87vfuzqm4b.fsf@deneb.enyo.de> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc01 1056224530 12.234.13.56 (Sat, 21 Jun 2003 19:42:10 GMT) NNTP-Posting-Date: Sat, 21 Jun 2003 19:42:10 GMT Organization: AT&T Broadband Date: Sat, 21 Jun 2003 19:42:10 GMT Xref: archiver1.google.com comp.lang.ada:39538 Date: 2003-06-21T19:42:10+00:00 List-Id: >Even with Ada 83, they should have used an errno-like variable and a >single exception. (In Ada 95, you can encode the error code in the >exception message.) The long exception list results in lots of "when >others =>" clauses silently discarding the exception if you want to >have reliable code which runs on real-world systems. You are laboring under a misunderstanding. The Posix binding does not have a "long exception list" and does not add new exceptions willy-nilly. As pointed out by Dave Emery, new error codes get added and it would be absurd to add new exceptions to the "standard" and ask people to add new exception handlers to their programs. There is an exception Posix.Posix_Error to force the program not to ignore problems. The program must then get the particular error code and figure out what to do. I suppose that might translate into "when others =>" in a case statement in old code, but it would be a bad programmer indeed who decided "There's an error. I don't understand it. I'll just pretend I didn't notice it".