<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 9: No logging of the exception throw</title><link>https://sourceforge.net/p/cpptest/bugs/9/</link><description>Recent changes to 9: No logging of the exception throw</description><atom:link href="https://sourceforge.net/p/cpptest/bugs/9/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 01 May 2014 20:22:26 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/cpptest/bugs/9/feed.rss" rel="self" type="application/rss+xml"/><item><title>#9 No logging of the exception throw</title><link>https://sourceforge.net/p/cpptest/bugs/9/?limit=25#cf46</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Philip Wardlaw</dc:creator><pubDate>Thu, 01 May 2014 20:22:26 -0000</pubDate><guid>https://sourceforge.netd06d85f81db0788d044deff79c4c110ebbcf1cee</guid></item><item><title>#9 No logging of the exception throw</title><link>https://sourceforge.net/p/cpptest/bugs/9/?limit=25#c372</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sebastian Pipping</dc:creator><pubDate>Thu, 01 May 2014 18:48:33 -0000</pubDate><guid>https://sourceforge.netb6d0d18be9288a30ac887a3ff4b115d718ee6ba3</guid></item><item><title>#9 No logging of the exception throw</title><link>https://sourceforge.net/p/cpptest/bugs/9/?limit=50#9151</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Philip Wardlaw</dc:creator><pubDate>Thu, 01 May 2014 18:46:06 -0000</pubDate><guid>https://sourceforge.net46a5cfecc0050a8d92302da6a0fdc9ee5061da71</guid></item><item><title>No logging of the exception throw</title><link>https://sourceforge.net/p/cpptest/bugs/9/</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dzmitry Liauchuk</dc:creator><pubDate>Sat, 22 May 2010 09:44:28 -0000</pubDate><guid>https://sourceforge.net051844dd7678a2256c76a8b1e4b0ce5984dca0e3</guid></item></channel></rss>