Merge lp:~mikemc/ubuntuone-ios-files/lotsa-error-logging into lp:ubuntuone-ios-files

Proposed by Mike McCracken
Status: Merged
Approved by: Mike McCracken
Approved revision: 87
Merged at revision: 89
Proposed branch: lp:~mikemc/ubuntuone-ios-files/lotsa-error-logging
Merge into: lp:ubuntuone-ios-files
Diff against target: 51 lines (+10/-2)
3 files modified
Files/U1FileDetailsViewController.m (+5/-1)
Files/U1FilesClient.m (+4/-1)
Files/U1FolderViewController.m (+1/-0)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-ios-files/lotsa-error-logging
Reviewer Review Type Date Requested Status
Brian Curtin (community) Approve
Review via email: mp+158432@code.launchpad.net

Commit message

- Add more error logging to aid in crash debugging

Description of the change

- Add more error logging to aid in crash debugging

To post a comment you must log in.
Revision history for this message
Brian Curtin (brian.curtin) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Files/U1FileDetailsViewController.m'
2--- Files/U1FileDetailsViewController.m 2013-04-04 21:18:14 +0000
3+++ Files/U1FileDetailsViewController.m 2013-04-11 17:13:25 +0000
4@@ -15,6 +15,8 @@
5
6 #import "U1FileDetailsViewController.h"
7
8+#import <Crashlytics/Crashlytics.h>
9+
10 #import "U1ByteSizeValueTransformer.h"
11 #import "U1FileNode.h"
12 #import "U1FilePreviewViewController.h"
13@@ -272,7 +274,9 @@
14 if (buttonIndex == 0)
15 {
16 [self.filesClient deleteNode:self.node completionBlock:^(NSError *error) {
17-
18+ if (error) {
19+ CLS_LOG(@"error in deleting a node: %@", error);
20+ }
21 }];
22 [self.navigationController popViewControllerAnimated:YES];
23 }
24
25=== modified file 'Files/U1FilesClient.m'
26--- Files/U1FilesClient.m 2013-04-04 23:22:35 +0000
27+++ Files/U1FilesClient.m 2013-04-11 17:13:25 +0000
28@@ -397,7 +397,10 @@
29 newNode.kind = @"file";
30 newNode.contentPath = [folderNode.contentPath stringByAppendingPathComponent:resourceName];
31 newNode.parent = folderNode;
32- [context save:NULL];
33+ NSError *err;
34+ if(![context save:&err]){
35+ CLS_LOG(@"Error saving new file node for upload to main context: %@", err);
36+ }
37 }];
38 node = (id)[self.dataRepository nodeWithResourcePath:resourcePath];
39 }
40
41=== modified file 'Files/U1FolderViewController.m'
42--- Files/U1FolderViewController.m 2013-04-03 22:56:25 +0000
43+++ Files/U1FolderViewController.m 2013-04-11 17:13:25 +0000
44@@ -379,6 +379,7 @@
45 if (error)
46 {
47 // TODO:
48+ CLS_LOG(@"Error deleting node: %@", error);
49 return;
50 }
51 }];

Subscribers

People subscribed via source and target branches