title: throw new Exception statement not working in MVC3 application
body: <p>I am trying to import details from an access database into my sql application database.  I have a check to make sure that it has imported all the rows, and if it hasn't then I want it to stop the process and throw an error.</p>
  
  <p>However, despite it going into the correct function, and hitting the "throw" line, it doesn't throw the error, and instead just carries on with the process.</p>
  
  <p>Should this code block not work?</p>
  
  <pre><code>AccessRepository details = new AccessRepository();
  if (numRows != details.GetDetailsRowCount(periodsInFreq, payDate))
  {
     throw new DataException("Some data is missing from the Details table (only " + numRows.ToString() + " rows) - Please try again.  If this problem persists, please contact the system administrator");
  }
  </code></pre>
  
  <p>Thanks</p>