Skip to content
This repository has been archived by the owner on Aug 17, 2019. It is now read-only.

Commit

Permalink
Log argument index and selector for KWMessagePatternException
Browse files Browse the repository at this point in the history
  • Loading branch information
paulz authored and Paul Zabelin committed May 21, 2012
1 parent 9215fd3 commit cb1fd46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Kiwi/KWMessagePattern.m
Expand Up @@ -146,8 +146,9 @@ - (BOOL)argumentFiltersMatchInvocationArguments:(NSInvocation *)anInvocation {
return NO;
}
} else if ([argumentFilter isEqual:[KWNull null]]) {
if (!KWObjCTypeIsPointerLike(objCType))
[NSException raise:@"KWMessagePatternException" format:@"nil was specified as an argument filter, but argument is not a pointer"];
if (!KWObjCTypeIsPointerLike(objCType)) {
[NSException raise:@"KWMessagePatternException" format:@"nil was specified as an argument filter, but argument(%d) is not a pointer for @selector(%@)", i + 1, NSStringFromSelector([anInvocation selector])];
}
void *p = nil;
[anInvocation getMessageArgument:&p atIndex:i];
if (p != nil)
Expand Down

0 comments on commit cb1fd46

Please sign in to comment.