Parsing: Error on duplicate entries
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
@@ -281,3 +281,5 @@
|
||||
|
||||
"macAlertUnrecognizedPeerKey (%@)" = "Peer contains unrecognized key '%@'";
|
||||
"macAlertInfoUnrecognizedPeerKey" = "Valid keys are: 'PublicKey', 'PresharedKey', 'AllowedIPs', 'Endpoint' and 'PersistentKeepalive'";
|
||||
|
||||
"macAlertMultipleEntriesForKey (%@)" = "There should be only one entry per section for key '%@'";
|
||||
|
||||
@@ -45,6 +45,8 @@ extension TunnelConfiguration.ParseError: WireGuardAppError {
|
||||
return (tr(format: "macAlertUnrecognizedPeerKey (%@)", value), tr("macAlertInfoUnrecognizedPeerKey"))
|
||||
case .multiplePeersWithSamePublicKey:
|
||||
return (tr("alertInvalidPeerMessagePublicKeyDuplicated"), "")
|
||||
case .multipleEntriesForKey(let value):
|
||||
return (tr(format: "macAlertMultipleEntriesForKey (%@)", value), "")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user