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.