Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-07-21 12:11:16


Russell Hind <rhind_at_[hidden]> writes:

> David Abrahams wrote:
>> Well, that's not my philosophy FWIW. Mine is:
>> if the condition is a programmer error, use assert
>> otherwise, use a well-documented exception
>>
>
> So can I draw you back to the original question of why a locked
> scoped_lock throws rather than asserts? The only thing that can cause
> this is calling lock on it twice which is a programming error, isn't
> it?

I didn't write that code, but I think you can find the answer in the
mailing list archives. I'm pretty sure I asked Bill Kempf the same
thing and he answered.

> It certainly isn't dependent on any external factors that I can
> see. Or are assert/throw decisions left up to the individual library
> implementors boost and William Kempf has a different view to yours
> on asserts/throws?

All decisions are left up to individual library implementors.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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