title: Catching Exception inside nested Using statement of NHibernate
body: <p>What is the right way to handle exception inside nested using statement? I have the following part of code:</p>
  
  <pre><code>public void Create(Entity entity)
  {
      try
      {
          using (ISession session = NhibernateHelper.OpenSession())
          {
              try
              {
                  using (ITransaction transaction = session.BeginTransaction())
                  {
                      session.Save(entity);
                      transaction.Commit();
                  }
              }
              catch (TransactionException transactionException)
              {
                  // log it
                  throw;
              }
          }
      }
      catch (TransactionException transactionException)
      {
          // log it
          throw;
      }
      catch (SessionException sessionException)
      {
          // log it
          throw;
      }
      catch (Exception exception)
      {
          // log it
          throw;
      }
  }
  </code></pre>
  
  <p>I saw few answers when people put try/catch statement inside nested using. I know that using statement consists of try/finally. And my question is about right way to catch all possible exceptions. Should I do rollback inside one of catch statements? Could you provide me the right way to do it?</p>