• 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
Dealing with NSError outside of the Responder chain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dealing with NSError outside of the Responder chain


  • Subject: Dealing with NSError outside of the Responder chain
  • From: Paul Sargent <email@hidden>
  • Date: Tue, 27 May 2008 20:38:44 +0100

Hi,

I'm writing a model class that uses (in order to access on on disk database) NSFileManager to read directory contents, and so I'm using the method:

- (NSArray *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error

(directoryContentsAtPath is depreciated in 10.5, and this is the replacement. Yes, I'm writing 10.5 or higher code)

My question is what is accepted practice when I get an NSError back? Reading the Error Handling Programming Guide I get the idea that errors can be passed up the responder chain so that the user can be alerted, and take action. Thing is, as I said, this is in a model class (super is NSObject), so it isn't a responder and not part of the responder chain. Nor is this a document based app, so I'm not using NSDocument or NSDocumentController.

I'd like to alert the user when things go wrong, but I don't see a way of getting the NSError back to a responder. I feel like there's a missing link somewhere.

Thanks

Paul
_______________________________________________

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: Dealing with NSError outside of the Responder chain
      • From: "Adam R. Maxwell" <email@hidden>
  • Prev by Date: [moderator] Re: Cocoa-dev Digest, Vol 5, Issue 919
  • Next by Date: Re: running an external app
  • Previous by thread: Re: NSNotificationCenter: addObserver:selector:name:object: - Specifying a single event
  • Next by thread: Re: Dealing with NSError outside of the Responder chain
  • Index(es):
    • Date
    • Thread