aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-08-21 18:31:37 +0000
committerstuconnolly <stuart02@gmail.com>2009-08-21 18:31:37 +0000
commit2b4af74516353df1a8e4db256a2b3e58f319ed94 (patch)
treea064cd013e4af992d941173249cf901eab9d0433 /Source
parent0b4391e4efa7fda146f3c07f1fd2c080ca3c2fe8 (diff)
downloadsequelpro-2b4af74516353df1a8e4db256a2b3e58f319ed94.tar.gz
sequelpro-2b4af74516353df1a8e4db256a2b3e58f319ed94.tar.bz2
sequelpro-2b4af74516353df1a8e4db256a2b3e58f319ed94.zip
When an error occurs whilst trying to add a password to the Keychain present a dialog to user, suggesting the repair their Keychain or contact us if the problem persists.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPKeychain.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/SPKeychain.m b/Source/SPKeychain.m
index 0929317d..5e98eb26 100644
--- a/Source/SPKeychain.m
+++ b/Source/SPKeychain.m
@@ -97,8 +97,14 @@
NULL); // The item reference
if (passwordAccessRef) CFRelease(passwordAccessRef);
+
if (status != noErr) {
NSLog(@"Error (%i) while trying to add password for name: %@ account: %@", status, name, account);
+
+ NSBeginAlertSheet(NSLocalizedString(@"Error adding password to Keychain", @"error adding password to keychain message"),
+ NSLocalizedString(@"OK", @"OK button"),
+ nil, nil, [NSApp mainWindow], self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"An error occured while trying to add the password to your Keychain. Repairing your Keychain might resolve this, but if it doesn't please report it to the Sequel Pro team, supplying the error code %i.", @"error adding password to keychain informative message"), status]);
}
}
}