[Cosmo-dev] Client Side Service Exceptions
Bobby Rullo
br at osafoundation.org
Wed Feb 7 09:53:04 PST 2007
On Feb 7, 2007, at 9:39 AM, Randy Letness wrote:
> Bobby Rullo wrote:
>> 2) For this specific bug (7572) I don't recommend the ui code
>> merely re-trying to update the event. This would blow away any
>> changes that we're just made by the other client. Not sure what a
>> better solution is though short of a whole conflict resolution ui.
>> Maybe a dialog box like "Keep your changes, or get changes from
>> the server?"
>>
>
> What about grabbing the changes from the server and displaying them
> in the dialog box along with an option to keep or ignore your changes?
>
Yes, thats fine, but is prob. out of scope for the near future
(0.6.1) - it would require UI, some sort of a diff engine, etc.
>> Also mde mentions the need of a "This item was deleted by someone
>> else while you were trying to edit it, so it's gone now." sort of
>> Exception. The problem is I don't think the server can tell
>> whether an item is not around anymore because it was deleted, or
>> because it never existed - it just knows that there is no such
>> item with a UID of xxxxxxx. The proper thing to do would be to
>> throw a "NoSuchResource" exception and catch that and have the
>> client interpret it in the proper way ("The item in question no
>> longer exists...Do you want to blah blah blah" or something). This
>> is not implemented yet however, so you'll just get some weird
>> error from the server.
>
> If you get a NoSuchResource exception, you basically know that the
> item was deleted right? Otherwise you wouldn't be able to update
> the item in the first place.
>
Yes, exactly. My point was that the server doesn't know the
difference between "NoSuchResourceCuzItNeverExisted" and
"NoSuchResrouceRightNowButThereUsedToBeSadlyNowItHasBeenRemoved" and
it's up to the client to make the inference you suggest.
> -Randy
> _______________________________________________
> cosmo-dev mailing list
> cosmo-dev at lists.osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/cosmo-dev
More information about the cosmo-dev
mailing list