Permalink
Browse files

Log argument index and selector for KWMessagePatternException

  • Loading branch information...
1 parent 9215fd3 commit cb1fd468cb7282bd58824379670f37ea200dc5b6 @paulz paulz committed with Paul Zabelin Mar 18, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 Kiwi/KWMessagePattern.m
View
@@ -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)

0 comments on commit cb1fd46

Please sign in to comment.