Boost logo

Boost Users :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2006-03-02 16:24:42

"Sean Huang" <huangsean_at_[hidden]> wrote in message
> For example:
> BOOST_CHECK_THROW( (throw "string exception"), std::exception );
> I was expecting to get an error message in the form
> "error in xxx: exception<std::exception> expected".
> Instead a message like the following was logged:
> unknown location(0): fatal error in "xxxx": unknown type
> I'm not sure if this behavior is by design. If it is, it would be nice
> tools
> that catch all exceptions are provided.

Unexpected exception is an error for any statement, for any tool. Common
rule is that execution monitors deals with it (like in case above).
BOOST_CHECK_THROW checks that particular exception gets thrown. There are 3
possible outcome:
1. No exception is thrown - error is reported by the tool
2. Expected exception is thrown - no error is reported
3. Unexpected exception is thrown - error is reported by test case monitor
(the same would happened if an unexpected exception would happened in any
other place)

Do you think this particular tool needs to catch all unexpected exceptions?
But in this case no information for these exceptions would be reported.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at