我正在尝试向GA发送例外,但有些事情让我感到困惑。
根据头文件:
+ (GAIDictionaryBuilder *)createExceptionWithDescription:(NSString *)description
withFatal:(NSNumber *)fatal;
[tracker send:[GAIDictionaryBuilder
createExceptionWithDescription:@"Connection timout %d: %@", connectionError, errorDescription // Exception description. May be truncated to 100 chars.
withFatal:NO] build]; // isFatal (required). NO indicates non-fatal exception.
NSNumber
为BOOL
,fatal
为fatal
。那么,我应该为{{1}}填写什么号码?或者只是1或0来表示是或否?因为布尔值似乎对我更有意义。
有什么想法吗?
答案 0 :(得分:2)
试试这个..
[tracker send:[GAIDictionaryBuilder
createExceptionWithDescription:@"Connection timout %d: %@", connectionError, errorDescription // Exception description. May be truncated to 100 chars.
withFatal:[NSNumber numberWithBool:NO] build];
答案 1 :(得分:0)
[tracker send:[[GAIDictionaryBuilder
createExceptionWithDescription:@"Connection timout %d: %@", connectionError, errorDescription
withFatal:NO]build]];