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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,98c463a9e98cfdf5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-13 07:36:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0902.news.uu.net!not-for-mail Message-ID: <3D08ADF9.7040104@mail.com> Date: Thu, 13 Jun 2002 10:36:41 -0400 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada exceptions. unchecked? References: <8db3d6c8.0206112300.3965a62b@posting.google.com> <3D0750F1.7A12342@raytheon.com> <$4ctS45vG2pB@eisner.encompasserve.org> <3D0771D3.FFEA1AA4@san.rr.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Cache-Post-Path: master.nyc.kbcfp.com!unknown@mosquito.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1023978964 8954 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:25870 Date: 2002-06-13T10:36:41-04:00 List-Id: Dale Stanbrough wrote: > For example I have a convenience generic to iterate over each line > of a file - you pass a procedure that does the work on each line. > Clearly the generic can't know what exceptions the procedure could > generate. Same problem in C++. Except for throwing nothing, C++ experts have come to the conclusion that exception specifications are useless. I think they're also misguided. The point of using exceptions for signalling errors is to communicate information between the point where the error happens and the point at which someone is ready to deal with it. The path in between is traversed quietly, with destructors (or Controlled objects) handling the cleanup of resources as scopes are closed down. There is no reason for code along the path to have to explicitly mention everything that can possibly pass through it.