Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-12-08 11:46:24


Martin Bonner wrote:
> From: Peter Dimov [mailto:pdimov_at_[hidden]]
>
>> And of course in a situation where throw_exception is used to throw
>> bad_alloc, an assertion makes even less sense, because there are no
>> "logic errors" involved, and presenting the effects of a failed
>> assertion to the end user would serve little purpose; the program
>> could do nothing to defend itself from the out of memory situation.
>
> But if a library is being used in an exception free environment, maybe
> presenting an assertion failure to the user is as good as you can do.

Possibly, but who is "you" in the above sentence? The whole point of using
an exception is that you the library author do not take responsibility of
handling the error, leaving it up to you the library user to do that
instead.


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