With each major update of Mac OS X, Apple updates more classes to return proper
NSErrors, deprecating methods which either don't give errors or give outmoded
error representations.
But what about NSKeyedArchiver and NSKeyedUnarchiver, in particular these
methods…
+[NSKeyedArchiver archivedDataWithRootObject:]
+[NSKeyedUnarchiver unarchiveObjectWithFile:]
-unarchiveObjectWithFile: takes a file, for heaven's sake. If someone has
messed with the file, eek, it raises an exception. I generally enclose these
methods in @try{} to avoid that. Very primitive!
Does anyone know why these methods not marked for deprecation? Is there a
reason why we don't we have 21st-century archive/unarchive methods that return
errors instead of raise exceptions?
Thank you,
Jerry Krinock
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]