ios: Capture more exceptionReason in exception processor.

This brings Crashpad in line with what Breakpad captures.

Change-Id: I8ce2d81fc9cb150dc9817034fac3516f27f5661b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3611069
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
This commit is contained in:
Justin Cohen 2022-05-10 10:44:56 -04:00 committed by Crashpad LUCI CQ
parent dfb3b59660
commit 34a090b573

View File

@ -147,7 +147,7 @@ static void SetNSExceptionAnnotations(NSException* exception,
@try { @try {
reason = base::SysNSStringToUTF8(exception.reason); reason = base::SysNSStringToUTF8(exception.reason);
static StringAnnotation<512> reasonKey("exceptionReason"); static StringAnnotation<1024> reasonKey("exceptionReason");
reasonKey.Set(reason); reasonKey.Set(reason);
} @catch (id reason_exception) { } @catch (id reason_exception) {
LOG(ERROR) << "Unable to read uncaught Objective-C exception reason."; LOG(ERROR) << "Unable to read uncaught Objective-C exception reason.";
@ -155,7 +155,7 @@ static void SetNSExceptionAnnotations(NSException* exception,
@try { @try {
if (exception.userInfo) { if (exception.userInfo) {
static StringAnnotation<512> userInfoKey("exceptionUserInfo"); static StringAnnotation<1024> userInfoKey("exceptionUserInfo");
userInfoKey.Set(base::SysNSStringToUTF8( userInfoKey.Set(base::SysNSStringToUTF8(
[NSString stringWithFormat:@"%@", exception.userInfo])); [NSString stringWithFormat:@"%@", exception.userInfo]));
} }