Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feeding NSUnarchiver bad data can cause crash



On 2 Jun 2004, at 9:27 pm, Douglas A. Welton wrote:

Jeremy,

Check out the section on "Handling Exceptions" in the Cocoa doc. NS_DURING,
NS_HANDLER, and NS_ENDHANDLER are your friend ;^}

I haven't had any luck with exception handling on this. Documentation and example code for exception handling seems hard to come by. Let's say I do this:

NS_DURING
theText = [NSUnarchiver unarchiveObjectWithData:plaintext];

or

@try {
theText = [NSUnarchiver unarchiveObjectWithData:plaintext];
}

What error precisely am I looking for? What goes in the if() statement?

Regards,
-Jeremy
_______________________________________________
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: 
 >Re: Feeding NSUnarchiver bad data can cause crash (From: "Douglas A. Welton" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.