title: Try/Catch block not catching Exception
body: <p>I have a statement inside a try/catch block, but the exception is not getting caught.  Can anyone explain?</p>
  
  <blockquote>
    <p>Exception Details:
    System.NullReferenceException: Object
    reference not set to an instance of an
    object.</p>
  </blockquote>
  
  <p>Source Error:</p>
  
  <pre><code>Line 139:                try
  Line 140:                {
  Line 141:                    return (int)Session["SelectedLeadID"];
  Line 142:                }
  Line 143:                catch (Exception ex)
  </code></pre>
  
  <p><strong>Update</strong>
  This is an ASP.NET application.  In the catch block, a new exception is thrown.  The code you see is what is displayed on the ASP.NET error page.</p>