<?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.5 &#8212; Exceptions, classes, and inheritance</title>
	<atom:link href="http://www.learncpp.com/cpp-tutorial/155-exceptions-classes-and-inheritance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learncpp.com/cpp-tutorial/155-exceptions-classes-and-inheritance/</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 12:30:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: saurabh</title>
		<link>http://www.learncpp.com/cpp-tutorial/155-exceptions-classes-and-inheritance/comment-page-1/#comment-96908</link>
		<dc:creator>saurabh</dc:creator>
		<pubDate>Mon, 06 Feb 2012 03:12:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=216#comment-96908</guid>
		<description>Oops i forget to paste header file part . You need to add following pre directives
#include 
#include 
using namespace std;</description>
		<content:encoded><![CDATA[<p>Oops i forget to paste header file part . You need to add following pre directives<br />
#include<br />
#include<br />
using namespace std;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: saurabh</title>
		<link>http://www.learncpp.com/cpp-tutorial/155-exceptions-classes-and-inheritance/comment-page-1/#comment-96907</link>
		<dc:creator>saurabh</dc:creator>
		<pubDate>Mon, 06 Feb 2012 03:10:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=216#comment-96907</guid>
		<description>I think you are missing one topic where programmer can override standard what() function of exception class to redefine their own exception handling . Like example below:

class myexc : public exception
	{
	 virtual const char * what () const throw ()
		 {
		 return &quot;my own exception&quot;;
		 }
	} mye;

int main()
	{
	try
		{

	throw mye;
		}

	catch (exception &amp; e)
		{
		cout&lt;&lt;e.what()&lt;&lt;&quot;in main cacth &quot;;
		}
	return 0;
	}
  other things i want to hilight that by default a function can throw all type of exception but if we want a function to not throw exception then add throw() at end of function signature like

myfun() throw()

Please add a article for this topic.</description>
		<content:encoded><![CDATA[<p>I think you are missing one topic where programmer can override standard what() function of exception class to redefine their own exception handling . Like example below:</p>
<p>class myexc : public exception<br />
	{<br />
	 virtual const char * what () const throw ()<br />
		 {<br />
		 return &#8220;my own exception&#8221;;<br />
		 }<br />
	} mye;</p>
<p>int main()<br />
	{<br />
	try<br />
		{</p>
<p>	throw mye;<br />
		}</p>
<p>	catch (exception &amp; e)<br />
		{<br />
		cout&lt;&lt;e.what()&lt;&lt;&quot;in main cacth &quot;;<br />
		}<br />
	return 0;<br />
	}<br />
  other things i want to hilight that by default a function can throw all type of exception but if we want a function to not throw exception then add throw() at end of function signature like</p>
<p>myfun() throw()</p>
<p>Please add a article for this topic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: goodsir</title>
		<link>http://www.learncpp.com/cpp-tutorial/155-exceptions-classes-and-inheritance/comment-page-1/#comment-95406</link>
		<dc:creator>goodsir</dc:creator>
		<pubDate>Tue, 03 May 2011 16:09:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=216#comment-95406</guid>
		<description>also, i would change &quot;exception&quot;(the first one) to &quot;index&quot; in this line:

Now, if the user passes in an invalid exception, operator[] will throw an int exception.</description>
		<content:encoded><![CDATA[<p>also, i would change &#8220;exception&#8221;(the first one) to &#8220;index&#8221; in this line:</p>
<p>Now, if the user passes in an invalid exception, operator[] will throw an int exception.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dear reader</title>
		<link>http://www.learncpp.com/cpp-tutorial/155-exceptions-classes-and-inheritance/comment-page-1/#comment-88039</link>
		<dc:creator>dear reader</dc:creator>
		<pubDate>Wed, 07 Jul 2010 15:04:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=216#comment-88039</guid>
		<description>it should be &quot;making&quot; instead of &quot;make&quot; in:
&quot;prevents the compiler from make a copy of the exception&quot;.</description>
		<content:encoded><![CDATA[<p>it should be &#8220;making&#8221; instead of &#8220;make&#8221; in:<br />
&#8220;prevents the compiler from make a copy of the exception&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - &#187; 15.6 &#8212; Exception dangers and downsides</title>
		<link>http://www.learncpp.com/cpp-tutorial/155-exceptions-classes-and-inheritance/comment-page-1/#comment-31088</link>
		<dc:creator>Learn C++ - &#187; 15.6 &#8212; Exception dangers and downsides</dc:creator>
		<pubDate>Sun, 26 Oct 2008 20:27:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=216#comment-31088</guid>
		<description>[...] 15.5 &#8212; Exceptions, classes, and inheritance  [...]</description>
		<content:encoded><![CDATA[<p>[...] 15.5 &#8212; Exceptions, classes, and inheritance  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - &#187; 15.4 &#8212; Uncaught exceptions, catch-all handlers, and exception specifiers</title>
		<link>http://www.learncpp.com/cpp-tutorial/155-exceptions-classes-and-inheritance/comment-page-1/#comment-31076</link>
		<dc:creator>Learn C++ - &#187; 15.4 &#8212; Uncaught exceptions, catch-all handlers, and exception specifiers</dc:creator>
		<pubDate>Sun, 26 Oct 2008 17:53:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=216#comment-31076</guid>
		<description>[...] 15.5 &#8212; Exceptions, classes, and inheritance  [...]</description>
		<content:encoded><![CDATA[<p>[...] 15.5 &#8212; Exceptions, classes, and inheritance  [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

