title: catch block gives me no match for operator error
body: <p>I am trying to catch the exception like below - </p>
  
  <pre><code>try {
  
  } catch (const std::exception&amp; ex) {
      cout &lt;&lt; "An exception occurred when executing query. " &lt;&lt; ex &lt;&lt; endl;
  }
  </code></pre>
  
  <p>But everytime I am getting this error - </p>
  
  <p><code>no match for operator&lt;&lt; in std::operator&lt;&lt; &lt;std::char_traits&lt;char&gt; &gt;((* &amp; std::cout), ((const char*)"An exception occurred when executing query. ")) &lt;&lt; ex</code></p>
  
  <p>Any idea what wrong I am doing here?</p>