Merge pull request #409 from Alkarex/patch-1
[mono.git] / mcs / class / System.Transactions / System.Transactions / PreparingEnlistment.cs
index 843d298ec99c0a40eb65bab389673393fa92cb98..8995fcb851a74f188ecd67b0d03a6915ad8589f0 100644 (file)
@@ -21,6 +21,7 @@ namespace System.Transactions
                Transaction tx;
                IEnlistmentNotification enlisted;
                WaitHandle waitHandle;
+               Exception ex;
 
                internal PreparingEnlistment (Transaction tx, IEnlistmentNotification enlisted)
                {
@@ -68,6 +69,14 @@ namespace System.Transactions
                {
                        get { return enlisted; }
                }
+
+               // Uncatched exceptions thrown during prepare will
+               // be saved here so they can be retrieved by TM.
+               internal Exception Exception
+               {
+                       get { return ex; }
+                       set { ex = value; }
+               }
        }
 }