• 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: exception/error handling question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exception/error handling question


  • Subject: Re: exception/error handling question
  • From: Bob Ippolito <email@hidden>
  • Date: Thu, 8 Jul 2004 23:48:58 -0400

On Jul 8, 2004, at 11:19 PM, gnat wrote:

> It was suggested by the objective-c list that I should ask this over
> here.
>
> I am writing a command line tool in Obj-C, and I have run into an
> issue that I can't seem to find the answer to. I populated
> NSMutableArrays with ABGroup and ABPerson objects, then added the
> arrays to a NSDictionary. As you would expect (though it took awhile
> for it to occur to me) calling writeToFile on the dictionary failed.
> My issue is how do I find the error message/code in a case like that?
> I tried wrapping it in an exception handler, but the exception is
> never triggered. I'm used to C where you can check errno, but that
> isn't getting set correctly.
> Any insight would be appreciated.

the localException you get in your NS_HANDLER is an instance of
NSException:
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
ObjC_classic/Classes/NSException.html

Hopefully it's obvious from there how to get useful info out of one.

-bob

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >exception/error handling question (From: gnat <email@hidden>)

  • Prev by Date: Re: exception/error handling question
  • Next by Date: Re: exception/error handling question
  • Previous by thread: Re: exception/error handling question
  • Next by thread: Re: exception/error handling question
  • Index(es):
    • Date
    • Thread