Boost logo

Boost :

From: williamkempf_at_[hidden]
Date: 2001-03-15 12:01:06

--- In boost_at_y..., Eugene Karpachov <jk_at_s...> wrote:
> Thu, Mar 15, 2001 at 04:03:28PM -0000, terekhov_at_y... ÐÉÛÅÔ:
> > > As usual with POSIX, check for -1 as error flag and inspect
> > You could
> > > throw some exception object containing this errno value.
> > >
> > > --
> > > jk
> >
> > POSIX _threads_ calls do not use errno (-1 as error flag)
> > ZERO return value is used as OK indication, non-zero
> > return value is used as spec. status (error) indication.
> Yes, you are right. Must check for !=0; but I insist on errno :)

I will *NOT* throw an exception containing an errno value. Such a
value is not portable (the errnos returned by various thread APIs
will not match) and so will not be useful to programmers. If the
specific type of error that occurred is necessary (I'm not sure it is
in most cases) then we either need to define our own errnos, or
preferrably throw different exceptions (or at least change the what()
text accordingly).

Bill Kempf

Boost list run by bdawes at, gregod at, cpdaniel at, john at