Do not perform optional try, this ate errors in the addressess and DNS input.

This commit is contained in:
Jeroen Leenarts 2018-08-16 22:03:40 +02:00
parent 5fd6d91b3a
commit 6b57ca0d98
1 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ extension Interface {
throw InterfaceValidationError.invalidPrivateKey
}
try? addresses?.commaSeparatedToArray().forEach { address in
try addresses?.commaSeparatedToArray().forEach { address in
do {
try _ = CIDRAddress(stringRepresentation: address)
} catch {
@ -27,7 +27,7 @@ extension Interface {
}
}
try? dns?.commaSeparatedToArray().forEach { address in
try dns?.commaSeparatedToArray().forEach { address in
do {
try _ = Endpoint(endpointString: address)
} catch {