<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 9: No logging of the exception throw</title><link href="https://sourceforge.net/p/cpptest/bugs/9/" rel="alternate"/><link href="https://sourceforge.net/p/cpptest/bugs/9/feed.atom" rel="self"/><id>https://sourceforge.net/p/cpptest/bugs/9/</id><updated>2014-05-01T20:22:26.755000Z</updated><subtitle>Recent changes to 9: No logging of the exception throw</subtitle><entry><title>#9 No logging of the exception throw</title><link href="https://sourceforge.net/p/cpptest/bugs/9/?limit=25#cf46" rel="alternate"/><published>2014-05-01T20:22:26.755000Z</published><updated>2014-05-01T20:22:26.755000Z</updated><author><name>Philip Wardlaw</name><uri>https://sourceforge.net/u/philwardlaw/</uri></author><id>https://sourceforge.netd06d85f81db0788d044deff79c4c110ebbcf1cee</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I can suggest the following fix, Although it may not work for more sophisticated outputs (html etc.)&lt;/p&gt;
&lt;p&gt;Modify lines 180 of src/suite.cpp onwards as follows:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;exception&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class="s"&gt;&amp;quot;&lt;/span&gt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="s"&gt;Error:   An exception was thrown during test '&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_name&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;()'&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;endl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;&lt;/span&gt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="s"&gt;Details: &amp;quot;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;what&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;endl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;_suite&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_suite&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_success&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Text output:&lt;/p&gt;
&lt;p&gt;SolutionVariableTest: 3/4&lt;br /&gt;
    Error:   An exception was thrown during test 'testSolMap()'&lt;br /&gt;
    Details: You have already added a SolutionVariable of corresponding VariableNames type to SolutionMap&lt;br /&gt;
SolutionVariableTest: 4/4&lt;br /&gt;
SolutionVariableTest: 4/4, 75% correct in 0.000466 seconds&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#9 No logging of the exception throw</title><link href="https://sourceforge.net/p/cpptest/bugs/9/?limit=25#c372" rel="alternate"/><published>2014-05-01T18:48:33.797000Z</published><updated>2014-05-01T18:48:33.797000Z</updated><author><name>Sebastian Pipping</name><uri>https://sourceforge.net/u/hartwork/</uri></author><id>https://sourceforge.netb6d0d18be9288a30ac887a3ff4b115d718ee6ba3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I might find time to review patches, but that's all, I'm afraid.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#9 No logging of the exception throw</title><link href="https://sourceforge.net/p/cpptest/bugs/9/?limit=50#9151" rel="alternate"/><published>2014-05-01T18:46:06.882000Z</published><updated>2014-05-01T18:46:06.882000Z</updated><author><name>Philip Wardlaw</name><uri>https://sourceforge.net/u/philwardlaw/</uri></author><id>https://sourceforge.net46a5cfecc0050a8d92302da6a0fdc9ee5061da71</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Has anything been done on this bug? I don't mind if there is no rigorous exception handling, but printing out e.what() would be very beneficial. It is very confusing for developers when a test fails due to an exception, and there is no output explaining this from CppTest. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>No logging of the exception throw</title><link href="https://sourceforge.net/p/cpptest/bugs/9/" rel="alternate"/><published>2010-05-22T09:44:28Z</published><updated>2010-05-22T09:44:28Z</updated><author><name>Dzmitry Liauchuk</name><uri>https://sourceforge.net/u/dliauchuk/</uri></author><id>https://sourceforge.net051844dd7678a2256c76a8b1e4b0ce5984dca0e3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When an exception is thrown within TEST_ASSERT then the whole function is reported as 0% successful. However, there is no information about what is the reason of 0% result and at what line the exception is thrown which makes fixing the problem harder.&lt;br /&gt;
I propose to change TEST_ASSERT to add information to the report that unexpected exception is thrown and log also the line and file where the TEST_ASSERT is invoked.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>