Boost C++ Libraries: Ticket #10143: BOOST.TEST BOOST_*_THROW behavior https://svn.boost.org/trac10/ticket/10143 <p> As has been suggested to me on the user list, I am filing a new ticket for a BOOST.TEST library bug. (<a class="ext-link" href="http://lists.boost.org/boost-users/2014/06/82308.php"><span class="icon">​</span>http://lists.boost.org/boost-users/2014/06/82308.php</a>) </p> <p> The BOOST_*_THROW behavior is currently that if an "unexpected" exception is thrown, it is not caught and simply unravels until it reaches terminate() or at least it has been my experience that it is so. I was under the impression, from the documentation found here (<a href="http://www.boost.org/doc/libs/1_55_0/libs/test/doc/html/utf/testing-tools/reference.html">http://www.boost.org/doc/libs/1_55_0/libs/test/doc/html/utf/testing-tools/reference.html</a>) that the tests would continue to run and that only a message (BOOST_ERROR) stating that the wrong exception was caught would be outputted. This is the sentence that lead me to believe that : </p> <p> " If check is successful, the tool produces a confirmation message, in other case it produces an error message in a form "error in test case name: exception exception expected. " </p> <p> Anyhow, the person who answered me about this on the mailing list suggested to consider this a bug rather than a feature request (see first link above) "because the reference docs for BOOST_*_THROW state that "check fails" if an unrelated exception is thrown, which is at least misleading at present if not incorrect". So here I am filing the ticket. </p> <p> I hope I am clear enough about my problem. If not, I am sorry and willing to clarify things. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10143 Trac 1.4.3 Gennadiy Rozental Sun, 05 Jul 2015 22:32:37 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/10143#comment:1 https://svn.boost.org/trac10/ticket/10143#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> All testing tools can fail with exception. BOOST_CHECK_THROW is not that different from BOOST_TEST(a==b). It has one good result, one bad result and one exception execution path. In later case exception is caught by execution monitor and reported as fatal test case error. We do not want to replicate rather complicated logic of catching unknown exception at every assertion location. If you want to continue with other assertions I suggest placing them into a separate test case. </p> Ticket Raffi Enficiaud Fri, 18 Sep 2015 08:12:04 GMT <link>https://svn.boost.org/trac10/ticket/10143#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10143#comment:2</guid> <description> <p> Hi, </p> <p> I revised the documentation to clarify the behaviour of all exception related macros. Should be online by version 1.60. </p> </description> <category>Ticket</category> </item> </channel> </rss>