Permalink
Browse files

Update error messages

  • Loading branch information...
1 parent 04add22 commit 1777cad347b10783fbe256f10e849d7baf8c4c65 @richard richard committed May 31, 2010
View
6 Classes/Settings/SettingsController.m
@@ -599,10 +599,10 @@ - (void)loginSuccess {
[[self tableView] setNeedsDisplay];
}
-- (void)loginFailed {
+- (void)loginFailedWithError:(NSString*)message {
UIAlertView *alert = [[UIAlertView alloc]
- initWithTitle:@"Cannot Login"
- message:@"Unable to log into Dropbox with those credentials."
+ initWithTitle:@"Dropbox Error"
+ message:message
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:nil];
View
2 Classes/Sync/Dropbox/DropboxTransferManager.h
@@ -29,7 +29,7 @@
@protocol DropboxLoginDelegate <NSObject>
@optional
- (void)loginSuccess;
-- (void)loginFailed;
+- (void)loginFailedWithError:(NSString*)message;
@end
@interface DropboxTransferManager : TransferManager <DBRestClientDelegate> {
View
2 Classes/Sync/Dropbox/DropboxTransferManager.m
@@ -213,7 +213,7 @@ - (void)restClientDidLogin:(DBRestClient*)client
- (void)restClient:(DBRestClient*)client loginFailedWithError:(NSError*)error
{
- [loginDelegate loginFailed];
+ [loginDelegate loginFailedWithError:@"Bad username and password or network error."];
}
- (void)restClient:(DBRestClient*)client loadedMetadata:(NSDictionary*)metadata
View
10 Classes/Sync/SyncManager.m
@@ -723,7 +723,7 @@ - (void)transferFailed:(TransferContext*)context {
} else {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Error syncing changes"
- message:[NSString stringWithFormat:@"An error was encountered while attempting to fetch mobileorg.org from the WebDAV server. The error was:\n\n%@", [context errorText]]
+ message:[NSString stringWithFormat:@"An error was encountered while attempting to fetch mobileorg.org from the server. The error was:\n\n%@", [context errorText]]
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:nil];
@@ -739,7 +739,7 @@ - (void)transferFailed:(TransferContext*)context {
// Abort.. we tried to make the mobileorg.org file and couldn't
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Error creating mobileorg.org"
- message:[NSString stringWithFormat:@"An error was encountered while attempting to create mobileorg.org on the WebDAV server. The error was:\n\n%@", [context errorText]]
+ message:[NSString stringWithFormat:@"An error was encountered while attempting to create mobileorg.org on the server. The error was:\n\n%@", [context errorText]]
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:nil];
@@ -756,7 +756,7 @@ - (void)transferFailed:(TransferContext*)context {
// Abort.. we couldn't upload local changes
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Error uploading mobileorg.org"
- message:[NSString stringWithFormat:@"An error was encountered while attempting to upload mobileorg.org to the WebDAV server. The error was:\n\n%@", [context errorText]]
+ message:[NSString stringWithFormat:@"An error was encountered while attempting to upload mobileorg.org to the server. The error was:\n\n%@", [context errorText]]
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:nil];
@@ -778,7 +778,7 @@ - (void)transferFailed:(TransferContext*)context {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Error downloading checksums"
- message:[NSString stringWithFormat:@"An error was encountered while downloading checksums.dat from the WebDAV server. This file isn't required, but the error received was unusual. The error was:\n\n%@", [context errorText]]
+ message:[NSString stringWithFormat:@"An error was encountered while downloading checksums.dat from the server. This file isn't required, but the error received was unusual. The error was:\n\n%@", [context errorText]]
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:nil];
@@ -795,7 +795,7 @@ - (void)transferFailed:(TransferContext*)context {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Error downloading Org-file"
- message:[NSString stringWithFormat:@"An error was encountered while attempting to download %@ from the WebDAV server. The error was:\n\n%@", [[context remoteUrl] path], [context errorText]]
+ message:[NSString stringWithFormat:@"An error was encountered while attempting to download %@ from the server. The error was:\n\n%@", [[context remoteUrl] path], [context errorText]]
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:nil];

0 comments on commit 1777cad

Please sign in to comment.