private void MapTxExceptionToHR(TransactionException txException, bool isInCommit)
        {
            TransactionAbortedException exception = txException as TransactionAbortedException;

            if (exception != null)
            {
                if (isInCommit)
                {
                    TransactionProxyException.ThrowTransactionProxyException(-2147164158, exception);
                }
                else
                {
                    TransactionProxyException.ThrowTransactionProxyException(-2147164157, exception);
                }
            }
            TransactionManagerCommunicationException exception2 = txException as TransactionManagerCommunicationException;

            if (exception2 != null)
            {
                TransactionProxyException.ThrowTransactionProxyException(-2147164145, exception2);
            }
            COMException baseException = txException.GetBaseException() as COMException;

            if (baseException != null)
            {
                TransactionProxyException.ThrowTransactionProxyException(baseException.ErrorCode, txException);
            }
            else
            {
                TransactionProxyException.ThrowTransactionProxyException(-2147418113, txException);
            }
        }