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,5afe598156615c8b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Get_Line problem (GNAT bug?) Date: Thu, 07 Dec 2006 10:21:36 +0100 Organization: Adalog Message-ID: <7fm8le.pa5.ln@hunter.axlog.fr> References: <1c1gbc5u9cpvp.1wj1zhhn7q86j$.dlg@40tude.net> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1165485965 1332 195.25.228.57 (7 Dec 2006 10:06:05 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 7 Dec 2006 10:06:05 +0000 (UTC) User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) In-Reply-To: Xref: g2news2.google.com comp.lang.ada:7847 Date: 2006-12-07T10:21:36+01:00 List-Id: Maciej Sobczak a �crit : >> 3. As Adam has suggested, End_Error exception is the right design; > > I don't find it to be "right". For me, exception is something that is > unexpected. An error, usually. I beg to differ. Otherwise, they would be called "errors" or "abnormal". An exception corresponds to an "exceptional" event, i.e. something that prevents usual processing, and forces you to an exceptional handling. If you consider that normal processing (normally the body of a loop) is the rule, it is an exception to the rule. And EOF certainly matches this definition (as is an error, of course, but it is not the only case). Exceptions are a useful tool in the programmers tool box. The narrow view of exceptions as just a way to handle errors is a mistake that prevents elegant solutions to some problems, in my view, and I've been constantly fighting against that. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr