At 9:13 PM +0200 11/15/02, Peter Dimov wrote:
>From: "Kevin S. Van Horn" <[EMAIL PROTECTED]>
>> Peter Dimov write:
>>
>> > Throwing an exception from BOOST_ASSERT is undesired behavior. I don't
>> > want it as a standard option.
>>
>> Except that, in the case I pointed out, it sometimes is desired behavior
>> and the Right Thing(tm) to do.  One aborts an entire subcomputation /
>> transaction rather than aborting the entire program.  I expect this to be
>> the norm, not the exception (pardon the pun), for enterprise information
>> systems.
>
>I don't agree. Globally turning asserts into throws at the flip of a switch
>is never the Right Thing(tm) to do. To handle this transition, the code
>needs to be designed with it in mind. Otherwise the approach is, at best, a
>hack: throw an exception and hope for the best.

I must agree.
Consider the following code:

bool DoSomethingWithAPointer ( void *foo ) nothrow () {
        BOOST_ASSERT ( foo != NULL );
        // do something with foo
        }

Ignoring style points and placement of brackets (please), what
happens to that 'nothrow()' clause if BOOST_ASSERT throws?
-- 
-- Marshall

Marshall Clow     Idio Software   <mailto:[EMAIL PROTECTED]>
Hey! Who messed with my anti-paranoia shot?
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to