comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: RE: rename missing in Text_IO
Date: Tue, 08 May 2001 04:38:42 GMT
Date: 2001-05-08T04:38:42+00:00	[thread overview]
Message-ID: <mLKJ6.43239$Jh5.41288199@news1.rdc1.sfba.home.com> (raw)
In-Reply-To: 9d6rbl$6vs$1@nh.pace.co.uk

>"Ted Dennison" <dennison@telepath.com> 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?



  parent reply	other threads:[~2001-05-08  4:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-04 21:47 RE: rename missing in Text_IO Beard, Frank
2001-05-07 14:13 ` Marin David Condic
2001-05-07 15:28   ` Ted Dennison
2001-05-07 16:03     ` Marin David Condic
2001-05-07 18:03       ` Ted Dennison
2001-05-07 19:00         ` Marin David Condic
2001-05-08  4:38           ` tmoran
2001-05-08  4:38           ` tmoran [this message]
2001-05-08 13:16             ` Marin David Condic
2001-05-09 13:10               ` Stephen Leake
2001-05-09 14:44                 ` Marin David Condic
2001-05-10  4:39                   ` tmoran
2001-05-08  4:38     ` tmoran
2001-05-08 13:24       ` Ted Dennison
2001-05-12  4:04   ` Randy Brukardt
  -- strict thread matches above, loose matches on Subject: below --
2001-05-04 20:50 Beard, Frank
2001-05-04 21:21 ` Ted Dennison
2001-05-05 21:19   ` Keith Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox