Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-12-01 23:20:33


----- Original Message -----
From: "Gennadiy E. Rozental" <rogeeff_at_[hidden]>

>
> > =========
> > BOOST_CHECKPOINT( message ) - to be used to mark a test flow with a
> check
> > points. The checkpoint can help to locate a source of a runtime
> exception.
> > Example: test.cpp
> > int test_main( int, char* [] )
> > {
> > BOOST_CHECKPOINT( "Going to throw an exception" );
> > throw "some error";
> > return 0;
> > }
> > Output:
> > Exception in test_main : C string:some_error
> > test.cpp(3) : last checkpoint: Going to throw an exception
> >
> >
> > Have you considered supplying BOOST_THROW(...) instead?
>
> What exectly do you mean?
> I have BOOST_CHECK_THROW to check whether or not exception was
> thrown.

Sorry, I should have spelled it out:

#define BOOST_THROW(expression)\
do \
{ \
    BOOST_CHECKPOINT("throw " #expression); \
    throw expression; \
} \
while (0)


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