When setting a keychain password, there is a specific catch block for KeychainError. That is, when looking for an existing password, we want to keep going when well-known errors (KeychainError) are thrown, and rethrow any other error.
However, in #325, Keychain.password() throws instances of TunnelKitManagerError, thus escaping the KeychainError catch block. The nasty effect of this is that if we fail to find an existing password, the method may rethrow immediately and fail to set a password.
When setting a keychain password, there is a specific catch block for KeychainError. That is, when looking for an existing password, we want to keep going when well-known errors (KeychainError) are thrown, and rethrow any other error.
However, in #325, Keychain.password() throws instances of TunnelKitManagerError, thus escaping the KeychainError catch block. The nasty effect of this is that if we fail to find an existing password, the method may rethrow immediately and fail to set a password.
Bottom line: Swift untyped error handling sucks.
Fixes #327