If I have an Address class that implements IEditableObject, I might have EndEdit implementation like this:
public void EndEdit()
{
// BeginEdit would have set _editInProgress and save to *Editing fields
if (_editInProgress)
{
_line1 = _line1Editing;
_line2 = _line2Editing;
_city = _cityEditing;
_state = _stateEditing;
_postalCode = _postalCodeEditing;
_editInProgress = false;
}
}
If there is an exception on _city, then _line1, _line2, and possibly _city should revert. This problem isn't limited to EndEdit but probably found in other places as well.