Skip to content

Commit

Permalink
Cleanup RedBox display of native errors
Browse files Browse the repository at this point in the history
Reviewed By: nicklockwood

Differential Revision: D2615507

fb-gh-sync-id: 94f8013b418a3b95508cc55b9302fde4325bfcbf
  • Loading branch information
javache authored and facebook-github-bot-9 committed Nov 4, 2015
1 parent 7fec60e commit 0599696
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions React/Modules/RCTRedBox.m
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,14 @@ - (UITableViewCell *)reuseCell:(UITableViewCell *)cell forStackFrame:(NSDictiona
}

cell.textLabel.text = stackFrame[@"methodName"];
cell.detailTextLabel.text = [NSString stringWithFormat:@"%@ @ %@:%@",
[stackFrame[@"file"] lastPathComponent], stackFrame[@"lineNumber"], stackFrame[@"column"]];
if (stackFrame[@"file"]) {
cell.detailTextLabel.text = [NSString stringWithFormat:@"%@ @ %zd:%zd",
[stackFrame[@"file"] lastPathComponent],
[stackFrame[@"lineNumber"] integerValue],
[stackFrame[@"column"] integerValue]];
} else {
cell.detailTextLabel.text = @"";
}
return cell;
}

Expand Down

0 comments on commit 0599696

Please sign in to comment.