Наследование: System.Transactions.TransactionException
Пример #1
0
 protected override void PromotedTransactionOutcome(InternalTransaction tx)
 {
     if ((tx.innerException == null) && (tx.PromotedTransaction != null))
     {
         tx.innerException = tx.PromotedTransaction.InnerException;
     }
     throw TransactionAbortedException.Create(System.Transactions.SR.GetString("TraceSourceLtm"), tx.innerException);
 }
Пример #2
0
        internal static new TransactionAbortedException Create(string message, Exception innerException, Guid distributedTxId)
        {
            string messagewithTxId = message;

            if (IncludeDistributedTxId(distributedTxId))
            {
                messagewithTxId = string.Format(SR.DistributedTxIDInTransactionException, messagewithTxId, distributedTxId);
            }

            return(TransactionAbortedException.Create(messagewithTxId, innerException));
        }
 /// <summary>
 /// IUnitOfWork instance Id: {0} with transaction Id: {1} has failed to commit due to the following exception(s): {2}
 /// </summary>
 /// <param name="unitOfWorkId">The unit of work id.</param>
 /// <param name="transactionIdentifier">The transaction identifier.</param>
 /// <param name="exception">The exception.</param>
 /// <returns>NContextPersistenceError.</returns>
 public static NContextPersistenceError CommitFailed(Guid unitOfWorkId, String transactionIdentifier, TransactionAbortedException exception)
 {
     return new NContextPersistenceError("CommitFailed", unitOfWorkId, transactionIdentifier, String.Join(Environment.NewLine, exception.ToError().Messages));
 }
Пример #4
0
 private TransactionException CreateTransactionAbortedException(InternalTransaction tx)
 {
     return(TransactionAbortedException.Create(System.Transactions.SR.GetString("TraceSourceLtm"), System.Transactions.SR.GetString("TransactionAborted"), tx.innerException));
 }
 internal static TransactionAbortedException Create(string traceSource, Exception innerException)
 {
     return(TransactionAbortedException.Create(traceSource, SR.GetString(SR.TransactionAborted), innerException));
 }
Пример #6
0
 internal override void BeginCommit(InternalTransaction tx, bool asyncCommit, AsyncCallback asyncCallback, object asyncState)
 {
     throw TransactionAbortedException.Create(System.Transactions.SR.GetString("TraceSourceLtm"), tx.innerException);
 }
Пример #7
0
 internal override void GetObjectData(InternalTransaction tx, SerializationInfo serializationInfo, StreamingContext context)
 {
     throw TransactionAbortedException.Create(System.Transactions.SR.GetString("TraceSourceLtm"), tx.innerException);
 }
Пример #8
0
 internal override void CreateBlockingClone(InternalTransaction tx)
 {
     throw TransactionAbortedException.Create(System.Transactions.SR.GetString("TraceSourceLtm"), tx.innerException);
 }