comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Exceptions vs Error return values
Date: Sun, 05 Aug 2001 22:30:11 GMT
Date: 2001-08-05T22:30:11+00:00	[thread overview]
Message-ID: <TNjb7.33400$Kd7.20768372@news1.rdc1.sfba.home.com> (raw)
In-Reply-To: fb75c450.0108051328.2039584c@posting.google.com

> I'm currently trying to get to grips with winsock programming.  As
> part of this process I'm trying to put together a slightly higher
> level binding to the thin one provided with Gnat.
> ...
> Would it be a sensible guideline to relate the use of exceptions to
> the severity of error (for example as described in table below)?
   In Claw.Sockets (www.rrsoftware.com) we aways raise an exception.
There are a very few standard ones, eg. Busy_Error, Not_Valid_Error,
Not_Found_Error, but a lot of things raise Windows_Error.  In that
case there's a routine you call to get the specific error code -
normally, but not always, in 10004 .. 11004.

> 1  Winsock hasn't been initialised by a call to WSAStartup, or when
  Claw.Sockets also tries to reduce the number of possible errors.
For instance, it automatically does the WSAStartup call the first
time you do something with winsock, and a Finalize routine cleans up.



  reply	other threads:[~2001-08-05 22:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-05 21:28 Exceptions vs Error return values Hambut
2001-08-05 22:30 ` tmoran [this message]
2001-08-06 12:47 ` Stephen Leake
2001-08-06 13:57   ` Ted Dennison
2001-08-06 21:31 ` Freddy
replies disabled

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