Hi, I think the question was asked and answered but I cannot see a clearance what is the right way to write init in the cases the arguments are nil or wrong? Returning a nil or raising an exception?
- (id) initWithURL: (NSURL *) url { if ((self = [super init])) { if (!url) { // ? } if (![url isFileURL]) { // ? } } return self; } I can frequently see the following in init NSAssert(url, @"url may not be nil", ); -- best regards Ariel _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com