From: Griffin C. <gc...@us...> - 2005-04-23 20:58:32
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8822/DotNetMock.Framework/Data Modified Files: MockTransaction.cs Log Message: Rolled in fix for bug 1174059 Index: MockTransaction.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data/MockTransaction.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MockTransaction.cs 12 Feb 2005 09:23:39 -0000 1.7 --- MockTransaction.cs 23 Apr 2005 20:58:23 -0000 1.8 *************** *** 18,21 **** --- 18,23 ---- private Exception _rollbackException = null; + private bool _hasCommitFailed = false; // to allow for rollback later + /// <summary> /// Default Constructor *************** *** 70,74 **** } _rollbackCalled.Actual = true; ! if ( _commitCalled.Actual ) { throw new InvalidOperationException( "Cannot call rollback after Commit() has been called." ); --- 72,76 ---- } _rollbackCalled.Actual = true; ! if ( _commitCalled.Actual && _hasCommitFailed == false) { throw new InvalidOperationException( "Cannot call rollback after Commit() has been called." ); *************** *** 91,94 **** --- 93,97 ---- if ( _commitException != null ) { + _hasCommitFailed = true; throw _commitException; } |