Skip to content

Commit 813ceef

Browse files
authored
Present traceback as separate NSLog entries to avoid hitting the 1023 bytes limit (#56)
1 parent 4ab083a commit 813ceef

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • {{ cookiecutter.format }}/{{ cookiecutter.class_name }}

{{ cookiecutter.format }}/{{ cookiecutter.class_name }}/main.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,13 @@ int main(int argc, char *argv[]) {
335335
*/
336336
void crash_dialog(NSString *details) {
337337
NSLog(@"Application has crashed!");
338-
NSLog(@"========================\n%@", details);
338+
NSLog(@"========================");
339+
340+
NSArray *lines = [details componentsSeparatedByString:@"\n"];
341+
for (NSString *line in lines) {
342+
NSLog(@"%@", line);
343+
}
344+
339345
// TODO - acutally make this a dialog
340346
// NSString *full_message = [NSString stringWithFormat:@"An unexpected error occurred.\n%@", details];
341347
// // Create a stack trace dialog

0 commit comments

Comments
 (0)