Re: Replace -[NSKeyedUnarchiver unarchiveObjectWithData:] so it doesn't crash on corrupt archive
Re: Replace -[NSKeyedUnarchiver unarchiveObjectWithData:] so it doesn't crash on corrupt archive
- Subject: Re: Replace -[NSKeyedUnarchiver unarchiveObjectWithData:] so it doesn't crash on corrupt archive
- From: Jim Correia <email@hidden>
- Date: Fri, 3 Jul 2009 01:53:16 -0400
On Thu, Jul 2, 2009 at 11:17 PM, Jerry Krinock <email@hidden> wrote:
If -[NSKeyedUnarchiver unarchiveObjectWithData:] is handed a corrupt
> archive, it raises an exception AND crashes the program.
Do you have a sample app & data combo which demonstrates the crash?
+[NSKeyedUnarchiver unarchiveObjectWithData:] is documented to raise an
exception when feed an incomprehensible archive.
If you have no exception handler in place, the program will terminate. But
that isn't due to a bug in NSKeyedUnarchiver - it is just working as
advertised - whether or not you like the advertised behavior.
- Jim
_______________________________________________
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