Skip to content

Commit

Permalink
Log the NSError str and object description on app launch fail
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jasonmolenda committed May 5, 2020
1 parent 844096b commit 5034102
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lldb/tools/debugserver/source/MacOSX/MachProcess.mm
Expand Up @@ -164,16 +164,18 @@ static bool CallBoardSystemServiceOpenApplication(NSString *bundleIDNSStr,
[(NSString *)[bks_error localizedDescription] UTF8String];
if (error_str) {
open_app_error_string = error_str;
DNBLogError("In app launch attempt, got error "
"localizedDescription '%s'.", error_str);
const char *obj_desc =
[NSString stringWithFormat:@"%@", bks_error].UTF8String;
DNBLogError("In app launch attempt, got error "
"NSError object description: '%s'.",
obj_desc);
}
DNBLogThreadedIf(LOG_PROCESS, "In completion handler for send "
"event, got error \"%s\"(%ld).",
error_str ? error_str : "<unknown error>",
open_app_error);
// REMOVE ME
DNBLogError("In completion handler for send event, got error "
"\"%s\"(%ld).",
error_str ? error_str : "<unknown error>",
open_app_error);
}

[system_service release];
Expand Down

0 comments on commit 5034102

Please sign in to comment.