Taking "deadly init" a step further


#1

…what if I want the initialization to fail, if ‘initWithSecretCode’ has invalid value?
Raise an ‘exception’ or return a ‘nil’’ (since an ‘alloc’ has preceded the ‘init’) ?

For example:
someone uses a too-easy-to-break-code with ‘initWithSecretCode’, I want prevent them from creating an object.
while i understand in the ‘init’ maybe the object has yet to be created (true? or?), what is the effect of ‘alloc’, if any, that precedes the ‘init’ for the object?

Thanks.