title: How to handle exceptions thrown by disposable objects?
body: <p>What is the best way for using Disposable objects, assuming Constructor and Process methods may throw exception? I generally prefer one of below implementations.</p>
  
  <ol>
  <li><p>try-catch surrounding using block</p>
  
  <pre><code>try
  {
      using (Disposable dispObj = new Disposable())
      {
          dispObj.Process();
      }
  }
  catch (Exception ex)
  {
      // Do something
  }
  </code></pre></li>
  <li><p>try-catch-finally block.</p>
  
  <pre><code>Disposable dispObj2 = null;
  try
  {
      dispObj2 = new Disposable();
      dispObj2.Process();
  }
  catch (Exception ex)
  {
      // Do something
  }
  finally
  {
      if (dispObj2 != null)
      {
          dispObj2.Dispose();
      }
  }
  </code></pre></li>
  </ol>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Again: <strong>"assuming Constuctor and Process methods may throw exception"</strong>. I really do not understand why did nobody care about exceptions in their answers.</p>