Boost logo

Boost :

From: Eugene Talagrand (boostdevel_at_[hidden])
Date: 2005-12-12 12:26:36


On 12/12/2005 11:34, Martin Bonner wrote:
> ----Original Message----
> From: Giovanni P. Deretta [mailto:gpderetta_at_[hidden]]
> Sent: 12 December 2005 16:00
> To: boost_at_[hidden]
> Subject: Re: [boost] [asio] my review
>
>
>
>>>I'm against introduzing exceptions. But I agree it may be possible to
>>>work a little more in the error handling. But, IMO, it should be like
>>>adding helper classes for this, but not throwing exceptions.
>>>
>>
>>I think too that the current asio error handling interface is fine,
>>and it is not worth changing it a this time.
>
>
> Has anybody got a "non-ignorable return" class that they could add to boost?
> (A class that encapsulates a return value whose destructor asserts/aborts if
> the return code has not been examined or deliberatedly ignored by the
> calling code.)
>
> It would be a natural for this sort of application, and would be a generally
> useful utility class.
>

How about having it throw an exception instead? That way you could have
C-style errors if you choose, but exception-based handling if local
handling is not appropriate. It would be like a delayed optional
'throw'. It looks like it would fit in well here.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk