Cleanup RedBox display of native errors

Reviewed By: nicklockwood

Differential Revision: D2615507

fb-gh-sync-id: 94f8013b418a3b95508cc55b9302fde4325bfcbf
This commit is contained in:
Pieter De Baets 2015-11-04 12:04:56 -08:00 committed by facebook-github-bot-9
parent 7fec60e6c4
commit 05996963c9

View File

@ -193,8 +193,14 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
}
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;
}