Someone pointed out a mistake with the NHibernate Helper Project which has now been updated:
You should never rethrow an exception you've caught as you lose stack trace information. Rather than:
try
{
thing.Save();
transaction.Commit();
}
catch (Exception ex)
{
transaction.Rollback();
throw ex;
}
do:
try
{
thing.Save();
transaction.Commit();
}
catch (Exception)
{
transaction.Rollback();
throw; // doesn't lose stacktrace.
}