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,24a59fbc07128ff8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-07 21:38:42 PST Path: newsfeed.google.com!newsfeed.stanford.edu!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: RE: rename missing in Text_IO References: <9d6rbl$6vs$1@nh.pace.co.uk> X-Newsreader: Tom's custom newsreader Message-ID: Date: Tue, 08 May 2001 04:38:42 GMT NNTP-Posting-Host: 24.20.190.201 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 989296722 24.20.190.201 (Mon, 07 May 2001 21:38:42 PDT) NNTP-Posting-Date: Mon, 07 May 2001 21:38:42 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: newsfeed.google.com comp.lang.ada:7303 Date: 2001-05-08T04:38:42+00:00 List-Id: >"Ted Dennison" wrote in message >news:BrBJ6.4787$vg1.374667@www.newsranger.com... >> My current favorite trick is to just raise a single "Foo.Error" exception >for >> any C error condition in each package. There are obviously some situations >where >> this would be undesirable, but you'd be suprised how often its sufficient. >> Sometimes when extra info might be in order for diagnosis, it can just be >put >> into the execption message. >> >It might work nicely enough to get the job done. If a function was provided >to return a more detailed error code (the actual return status of the C >function?) that might be enough to get the job done cleanly. In Claw we have a very few exceptions, Already_Valid_Error for instance, plus Windows_Error : Exception; -- An (unusual) error occurred in Windows. -- The exception message for this exception -- always includes the Windows error code. But in Claw.Sockets, for instance, the windows error code is often uninteresting, so there is a specific procedure Get_Error_Code(Socket : in out Root_Socket_Type; Error_Code : out Error_Codes); -- Call this after a Windows_Error exception on an operation on Socket. to get the winsock error code. >Maybe an example or two would suffice as a guideline? "Make it look like >this!" I'll modestly suggest perusing the Claw docs, an early, incomplete, but still showing a flavor, work version of which is still posted at http://members.home.net/twmoran/H1.htm >Where do you want to draw the line and say "This far and no farther?" Perhaps Claw defines what's beyond the line?