What to do if [super init] returns nil?
Take the following code as an example
- (id)init {
self = [super init];
if (self) {
// code
}
return self;
}
I do not want nil to propagate up the calling hierarchy. My initial idea
is to throw an exception in case self is nil, make a restore point and
abort execution.
Better ideas?
No comments:
Post a Comment