Add more password name checks.

This commit is contained in:
Yishi Lin 2017-10-15 21:37:00 +08:00
parent 49180d74e6
commit b9ef596bfb
5 changed files with 56 additions and 16 deletions

View file

@ -15,6 +15,7 @@ public enum AppError: Error {
case PasswordDuplicatedError
case GitResetError
case PGPPublicKeyNotExistError
case WrongPasswordFilename
case UnknownError
}
@ -33,6 +34,8 @@ extension AppError: LocalizedError {
return "Cannot identify the latest synced commit."
case .PGPPublicKeyNotExistError:
return "PGP public key doesn't exist."
case .WrongPasswordFilename:
return "Cannot write to the password file."
case .UnknownError:
return "Unknown error."
}