<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 15.2 &#8212; Basic exception handling</title>
	<atom:link href="http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/</link>
	<description></description>
	<lastBuildDate>Thu, 11 Mar 2010 00:29:07 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Zied ALAYA</title>
		<link>http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/comment-page-1/#comment-76700</link>
		<dc:creator>Zied ALAYA</dc:creator>
		<pubDate>Mon, 18 Jan 2010 06:51:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=213#comment-76700</guid>
		<description>An excellent tutorial.
for the catch with a string throw: 
&lt;pre&gt;
catch (char* strException) // catch exceptions of type char*
    {
        cerr &lt;&lt; &quot;Error: &quot; &lt;&lt; strException &lt;&lt; endl;
    }
&lt;/pre&gt;

have to be:
&lt;pre&gt;
catch (const char* strException) // catch exceptions of type char*
    {
        cerr &lt;&lt; &quot;Error: &quot; &lt;&lt; strException &lt;&lt; endl;
    }
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>An excellent tutorial.<br />
for the catch with a string throw: </p>
<pre>
catch (char* strException) // catch exceptions of type char*
    {
        cerr &lt;&lt; &quot;Error: &quot; &lt;&lt; strException &lt;&lt; endl;
    }
</pre>
<p>have to be:</p>
<pre>
catch (const char* strException) // catch exceptions of type char*
    {
        cerr &lt;&lt; &quot;Error: &quot; &lt;&lt; strException &lt;&lt; endl;
    }
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lubos</title>
		<link>http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/comment-page-1/#comment-73293</link>
		<dc:creator>Lubos</dc:creator>
		<pubDate>Sun, 29 Nov 2009 21:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=213#comment-73293</guid>
		<description>or (const char *strException). char *const strException, otoh, doesn&#039;t work - i assume strException is treated here as pointer to a constant &quot;string&quot;, not a constant pointer... right?</description>
		<content:encoded><![CDATA[<p>or (const char *strException). char *const strException, otoh, doesn&#8217;t work &#8211; i assume strException is treated here as pointer to a constant &#8220;string&#8221;, not a constant pointer&#8230; right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hamude</title>
		<link>http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/comment-page-1/#comment-63367</link>
		<dc:creator>Hamude</dc:creator>
		<pubDate>Mon, 29 Jun 2009 12:54:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=213#comment-63367</guid>
		<description>what can the program sqrt do?</description>
		<content:encoded><![CDATA[<p>what can the program sqrt do?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hamude</title>
		<link>http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/comment-page-1/#comment-63360</link>
		<dc:creator>Hamude</dc:creator>
		<pubDate>Mon, 29 Jun 2009 10:28:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=213#comment-63360</guid>
		<description>Hi 
this tutorial is really great</description>
		<content:encoded><![CDATA[<p>Hi<br />
this tutorial is really great</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kg</title>
		<link>http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/comment-page-1/#comment-62165</link>
		<dc:creator>kg</dc:creator>
		<pubDate>Tue, 09 Jun 2009 15:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=213#comment-62165</guid>
		<description>in the sqrt program, both compilers I tried (g++4.3 &amp; icpc11.0) made the throw statement of type char const*, so the catch statement would have to be 
&lt;pre&gt;
  catch (char const* strException) 
&lt;/pre&gt;
for this exception to work properly

just a heads up :)</description>
		<content:encoded><![CDATA[<p>in the sqrt program, both compilers I tried (g++4.3 &amp; icpc11.0) made the throw statement of type char const*, so the catch statement would have to be </p>
<pre>
  catch (char const* strException)
</pre>
<p>for this exception to work properly</p>
<p>just a heads up :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/comment-page-1/#comment-42003</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Fri, 06 Feb 2009 08:11:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=213#comment-42003</guid>
		<description>In the last example, the try block purposefully doesn’t throw anything, because it doesn’t really have any context to determine that something went wrong. Instead, it’s leaving it up to ReadParameter() to throw an exception if something went wrong. If ReadParameter() throws an int exception, the catch block will catch it and handle it.</description>
		<content:encoded><![CDATA[<p>In the last example, the try block purposefully doesn’t throw anything, because it doesn’t really have any context to determine that something went wrong. Instead, it’s leaving it up to ReadParameter() to throw an exception if something went wrong. If ReadParameter() throws an int exception, the catch block will catch it and handle it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kavitha</title>
		<link>http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/comment-page-1/#comment-39478</link>
		<dc:creator>Kavitha</dc:creator>
		<pubDate>Tue, 27 Jan 2009 15:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=213#comment-39478</guid>
		<description>Does the last example not require any THROW statement in the try block?Without that how would the try block know that an int value is thrown?</description>
		<content:encoded><![CDATA[<p>Does the last example not require any THROW statement in the try block?Without that how would the try block know that an int value is thrown?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - &#187; 15.3 &#8212; Exceptions, functions, and stack unwinding</title>
		<link>http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/comment-page-1/#comment-29222</link>
		<dc:creator>Learn C++ - &#187; 15.3 &#8212; Exceptions, functions, and stack unwinding</dc:creator>
		<pubDate>Sun, 05 Oct 2008 19:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=213#comment-29222</guid>
		<description>[...] 15.2 &#8212; Basic exception handling  [...]</description>
		<content:encoded><![CDATA[<p>[...] 15.2 &#8212; Basic exception handling  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - &#187; 15.1 &#8212; Introduction to exceptions</title>
		<link>http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/comment-page-1/#comment-29221</link>
		<dc:creator>Learn C++ - &#187; 15.1 &#8212; Introduction to exceptions</dc:creator>
		<pubDate>Sun, 05 Oct 2008 19:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=213#comment-29221</guid>
		<description>[...] 15.2 &#8212; Basic exception handling  [...]</description>
		<content:encoded><![CDATA[<p>[...] 15.2 &#8212; Basic exception handling  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - &#187; 15.1 &#8212; Introduction to exceptions</title>
		<link>http://www.learncpp.com/cpp-tutorial/152-basic-exception-handling/comment-page-1/#comment-29125</link>
		<dc:creator>Learn C++ - &#187; 15.1 &#8212; Introduction to exceptions</dc:creator>
		<pubDate>Sat, 04 Oct 2008 21:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=213#comment-29125</guid>
		<description>[...] 15.2 &#8212; Exception handling (Part I)  [...]</description>
		<content:encoded><![CDATA[<p>[...] 15.2 &#8212; Exception handling (Part I)  [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
