title: Why does a Try/Catch block create new variable scope?
body: <p>For example:</p>
  
  <pre><code>try
  {
      SomeObject someObject = new SomeObject();
      someObject.dangerousMethod();
  }
  catch(Exception e)
  {
  }
  someObject.anotherMethod(); //can't access someObject!
  </code></pre>
  
  <p>But you can declare it before the <code>try/catch</code> block and then it works fine:</p>
  
  <pre><code>SomeObject someObject;
  try
  {
      someObject = new SomeObject();
      someObject.dangerousMethod();
  }
  catch(Exception e)
  {
  }
  someObject.anotherMethod(); //works fine
  </code></pre>
  
  <p>I'm just wondering the design reason for this.  Why are Objects created within the <code>try/catch</code> block not in scope with the rest of the method?  Maybe I'm not understanding deep down how a <code>try/catch</code> works besides just watching for <code>Exceptions</code> thrown.</p>