title: cin and try/catch
body: <p>I have this simple try catch for throwing cin exceptions, but it never throws exceptions.</p>
  
  <pre><code>while(cin&gt;&gt;num) {
     try {
        if(cin.fail()) {
           throw "error";
        }
        if(num&gt;0) {
          cout &lt;&lt; "number greater than 0" &lt;&lt; endl;
        }
     }
     catch(char* error) {
        cout &lt;&lt; error &lt;&lt; endl;
     }
  }
  </code></pre>
  
  <p>Why it is not throwing the exception?</p>