title: Exception not caught in try catch block
body: <p>I do a simple <em>throw "TEST THROW"</em> and it isn't caught in my <em>catch (std::exception&amp; e)</em>. Is it because I'm catching an <em>std::exception&amp; e</em>? I mean, are only exception classes derived from std::exception caught? If not, am I doing something wrong or is it normal? By the way, none of the two catch blocks caught the throw exception.</p>
  
  <pre><code>int main()
  {
  try
  {
      throw "TEST THROW"; // TEST
      Core core;
  
      core.Init();
      core.Load();
  
      while (!core.requestCloseWindow)
      {
          core.HandleInput();
  
          core.Update();
          core.Draw();
      }
  
      core.Unload();
      core.window-&gt;close();
  }
  catch (std::exception&amp; e)
  {
      std::cerr &lt;&lt; e.what() &lt;&lt; std::endl;
      try
      {
          time_t rawTime;
          struct tm* timeInfo;
          char timeBuffer [80];
  
          time(&amp;rawTime);
          timeInfo = localtime(&amp;rawTime);
  
          strftime(timeBuffer, 80, "%F %T", timeInfo);
          puts(timeBuffer);
  
          std::ofstream ofs; // Pas besoin de close, car le destructeur le fait.
          ofs.exceptions(std::ofstream::failbit | std::ofstream::badbit);
          ofs.open("log.txt", std::ofstream::out | std::ofstream::app);
          ofs &lt;&lt; e.what() &lt;&lt; std::endl;
      }
      catch (std::exception&amp; e)
      {
          std::cerr &lt;&lt; "An error occured while writing to a log file!" &lt;&lt; std::endl;
      }
  }
  
  return 0;
  </code></pre>
  
  <p>}</p>