title: C++ Exception Not being caught
body: <p>Im attempting to throw an EmptyListException when my linked list is empty, but the program keeps terminating if i uncomment the throw EmptyListException().
  this is my EmptyListException header</p>
  
  <pre><code>#ifndef EMPTYLISTEXCEPTION_H
  #define EMPTYLISTEXCEPTION_H
  
  #include &lt;stdexcept&gt;
  using std::out_of_range;
  class EmptyListException : public out_of_range
  {
      public:
          EmptyListException(): out_of_range("Empty List!\n") {}
  
  };
  
  #endif // EMPTYLISTEXCEPTION_H
  </code></pre>
  
  <p>-- Throw command in Clist.h</p>
  
  <pre><code>template &lt;typename E&gt;
  E Clist&lt;E&gt;::Remove() throw()
  {
      if(isEmpty())
      {
          cout &lt;&lt; "Empty List, no removal";
          //throw EmptyListException();
          return '.';
      }
          ... code
  }
  </code></pre>
  
  <p>-- catch in Main</p>
  
  <pre><code>try{
      cout &lt;&lt; list-&gt;Remove() &lt;&lt; endl;
  } catch(EmptyListException &amp;emptyList)
  {
      cout &lt;&lt; "Caught :";
      cout &lt;&lt; emptyList.what() &lt;&lt; endl;
  }
  </code></pre>
  
  <p>The error 'This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.</p>