title: Code will not run past exception VS2012
body: <p>I have a try catch statement and when the code goes to throw the exception, it will not run past this point. </p>
  
  <p>I press F5/F10 and the code keeps running the same line of code. </p>
  
  <p>Is this to do with a setting in VS2012?</p>
  
  <p><strong>Calling code:</strong></p>
  
  <pre><code>       if (!string.IsNullOrEmpty(connections.xmlconSIPPPremium))
                      {
                          try
                          {
                              DataTable dt = GetUtilityFiles(connections.xmlconSIPPPremium);
                              foreach (DataRow dr in dt.Rows)
                              {
                                  File.WriteAllBytes(_rootDirectory + @"\" + dr["UtilityName"], (byte[])dr["UtilityBytes"]);
                              }
                          }
                          catch (Exception ex)
                          {
                              MessageBox.Show(ex.Message);
                          }
  
                      }
                      else if (!string.IsNullOrEmpty(connections.xmlconSSASPremium))
                      {
                          try
                          {
                              DataTable dt = GetUtilityFiles(connections.xmlconSSASPremium);
                              foreach (DataRow dr in dt.Rows)
                              {
                                  File.WriteAllBytes(_rootDirectory + @"\" + dr["UtilityName"], (byte[])dr["UtilityBytes"]);
                              }
                          }
                          catch(Exception ex)
                          {
                              MessageBox.Show(ex.Message);
                          }
  
                      }
                  }
  </code></pre>
  
  <p><strong>Issue:</strong></p>
  
  <pre><code>    private DataTable GetUtilityFiles(string strCon)
      {
          DataTable dt = new DataTable();
  
          using (SqlConnection con = new SqlConnection(strCon))
          {
              try
              {
                  using (SqlCommand cmd = new SqlCommand("[dmm].[vertUtility_Select]", con))
                  {
                      SqlDataAdapter sda = new SqlDataAdapter(cmd); 
                      sda.Fill(dt);         
                  }
              }
              catch (Exception ex)
              {
                  throw;
              }
              return dt;
          }
      }
  </code></pre>
  
  <p>Thanks!</p>