Skip to content

Commit 5034102

Browse files
committed
Log the NSError str and object description on app launch fail
Update CallBoardSystemServiceOpenApplication to unconditionally log the NSError's localizedDescription to Console on app launch failure (as it was already doing), and also to log the NSError object's full description to the console, which may contain additional nested error messages. I'm experimenting to find cases where we will get more detailed information from app launch failures and will start by logging both to the console. <rdar://problem/62709160>
1 parent 844096b commit 5034102

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lldb/tools/debugserver/source/MacOSX/MachProcess.mm

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,18 @@ static bool CallBoardSystemServiceOpenApplication(NSString *bundleIDNSStr,
164164
[(NSString *)[bks_error localizedDescription] UTF8String];
165165
if (error_str) {
166166
open_app_error_string = error_str;
167+
DNBLogError("In app launch attempt, got error "
168+
"localizedDescription '%s'.", error_str);
169+
const char *obj_desc =
170+
[NSString stringWithFormat:@"%@", bks_error].UTF8String;
171+
DNBLogError("In app launch attempt, got error "
172+
"NSError object description: '%s'.",
173+
obj_desc);
167174
}
168175
DNBLogThreadedIf(LOG_PROCESS, "In completion handler for send "
169176
"event, got error \"%s\"(%ld).",
170177
error_str ? error_str : "<unknown error>",
171178
open_app_error);
172-
// REMOVE ME
173-
DNBLogError("In completion handler for send event, got error "
174-
"\"%s\"(%ld).",
175-
error_str ? error_str : "<unknown error>",
176-
open_app_error);
177179
}
178180

179181
[system_service release];

0 commit comments

Comments
 (0)