Re: ObjC error messages
Re: ObjC error messages
- Subject: Re: ObjC error messages
- From: Ondra Cada <email@hidden>
- Date: Thu, 14 Feb 2002 13:48:50 +0100
Malte,
>
>>>>> Malte Tancred (MT) wrote at Thu, 14 Feb 2002 13:16:01 +0100:
MT> - (void)doesNotRecognizeSelector:(SEL)aSelector
...
MT> However,
MT> printing out error messages to stderr without anyone asking for
MT> it is not.
I, for one, rather like this behaviour. It seems to me that you _asked_ for
it by using a non-recognized and non-forwarded message ;). Nevertheless,
MT> A request to Apple: could the error message produced by the
MT> method -doesNotRecognizeSelector: be made optional? I would prefer
MT> "opt-in" optional.
I don't think you would really want to suppress the warning for others'
code. For your own code I guess the optionality can be achieved by very
simple
@implementation NSObject (GetRidOfTheConsoleWarningIDontLike)
-(void)doesNotRecognizeSelector:(SEL)aSelector {
[NSException raise:NSInvalidArgumentException format:...];
}
@end
Note that I *HAVEN'T* tested this, there could be some caveat hidden!
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.