remove some unwraps
This commit is contained in:
parent
15518733b0
commit
82232be92c
5 changed files with 31 additions and 27 deletions
|
|
@ -33,11 +33,11 @@ extension PasswordEntity {
|
|||
return passwordCategoryArray
|
||||
}
|
||||
|
||||
public func getURL() -> URL? {
|
||||
if let p = getPath().stringByAddingPercentEncodingForRFC3986() {
|
||||
return URL(string: p)
|
||||
public func getURL() throws -> URL {
|
||||
if let p = getPath().stringByAddingPercentEncodingForRFC3986(), let u = URL(string: p) {
|
||||
return u
|
||||
}
|
||||
return nil
|
||||
throw AppError.Unknown
|
||||
}
|
||||
|
||||
// XXX: define some getters to get core data, we need to consider
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue