• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Recovering from a merge conflict
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recovering from a merge conflict


  • Subject: Re: Recovering from a merge conflict
  • From: Fritz Anderson <email@hidden>
  • Date: Tue, 21 Dec 2010 09:08:40 -0600

On 21 Dec 2010, at 8:36 AM, Paulo Andrade wrote:

> int tries = 10;
> while ( tries-- ) {
> 	// compute this batch
>
>  [moc save:&error];
>  if (error != nil && [error code] == NSManagedObjectMergeError) {

This may not be your main problem, but you should never inspect a returned error object unless the method that returned it reports a failure:

if (! [moc save: &error] && [error code] == NSManagedObjectMergeError) {
	...

Such methods are free to set the error object at their start, in case they fail, but the error is correct only if the method does fail.

	— F

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Recovering from a merge conflict
      • From: Paulo Andrade <email@hidden>
References: 
 >Recovering from a merge conflict (From: Paulo Andrade <email@hidden>)

  • Prev by Date: Re: Performance: Drawing hundreds of short text strings
  • Next by Date: Re: access multiple NSTextFields as an array?
  • Previous by thread: Recovering from a merge conflict
  • Next by thread: Re: Recovering from a merge conflict
  • Index(es):
    • Date
    • Thread