Set name and url in Password non-optional
Name and url in Password class shouldn't be optional because we store them in core data as non-optional. This change also help us to avoid man unneccessary unwrap.
This commit is contained in:
parent
5262ca89f7
commit
2abbceb2e9
9 changed files with 60 additions and 39 deletions
|
|
@ -17,6 +17,7 @@ public enum AppError: Error {
|
|||
case PGPPublicKeyNotExistError
|
||||
case WrongPasswordFilename
|
||||
case YamlLoadError
|
||||
case DecryptionError
|
||||
case UnknownError
|
||||
}
|
||||
|
||||
|
|
@ -39,6 +40,8 @@ extension AppError: LocalizedError {
|
|||
return "Cannot write to the password file."
|
||||
case .YamlLoadError:
|
||||
return "Cannot be parsed as a YAML file."
|
||||
case .DecryptionError:
|
||||
return "Cannot decrypt password."
|
||||
case .UnknownError:
|
||||
return "Unknown error."
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue