0
我得到一个奇怪的语义问题:语义问题:缺少“[”的消息的发送开始表达
失踪“[”的消息的发送开始表达
和解析的问题:
预期 ']'
在NSLog
线AFURLConnectionOperation.m
:我添加
#define NSLog(__FORMAT__, ...) TFLog((@"%s [Line %d] " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
到我的项目的预编译的文件
@catch(NSException *e) { caughtException = e; }
if(caughtException) {
NSLog(NSLocalizedString(@"Unhandled exception on %@ networking thread: %@, userInfo: %@", nil), NSStringFromClass([self class]), caughtException, [caughtException userInfo]);
}
[exceptionPool drain];
后:Proj-Prefix.pch
我怎样才能解决这个问题?
我搜索了但没有任何解决方法,除了注释掉NSLog
行..
在此先感谢!
编辑:
NSLog(@"%@", [NSString stringWithFormat:NSLocalizedString(@"Unhandled exception on %@ networking thread: %@, userInfo: %@", nil), NSStringFromClass([self class]), caughtException, [caughtException userInfo]]);
和
NSLog(@"Unhandled exception on %@ networking thread: %@, userInfo: %@", NSStringFromClass([self class]), caughtException, [caughtException userInfo]);
都还好。
但是为什么原来的那个不?:?
Thanks @rob!这真的太棒了! (这个宏由TestFlight建议)顺便说一句,我发现你的答案大部分都很棒!你天才! ;) – Kjuly 2012-04-28 05:21:48