• 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: Best way to programmatically cancel an NSError?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to programmatically cancel an NSError?


  • Subject: Re: Best way to programmatically cancel an NSError?
  • From: George Orthwein <email@hidden>
  • Date: Fri, 21 Sep 2007 10:58:24 -0400

So I expect there is a standard way to suppress an NSError... but in case I'm doing something too unusual, I'll add some background...

I have an interesting inter-property validation situation where I would like to deny a certain change to an object and instead handle it in my controller by creating a new object. (Sounds weird, I know, but it does actually make sense in context, I promise!). Since validate<Key>:error: is in the model, I thought it would make sense to deny the change and then use the NSError to pass the message to the controller layer. My NSDocument subclass can then catch the error, suppress it, and react appropriately.

But how exactly should I suppress the error?

Thanks,
George
_______________________________________________

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


References: 
 >Best way to programmatically cancel an NSError? (From: George Orthwein <email@hidden>)

  • Prev by Date: Re: Need help with -mutableSetValueForKey:
  • Next by Date: Re: Need help with -mutableSetValueForKey:
  • Previous by thread: Best way to programmatically cancel an NSError?
  • Next by thread: Re: Best way to programmatically cancel an NSError?
  • Index(es):
    • Date
    • Thread