Skip to content

Commit

Permalink
switch default removed
Browse files Browse the repository at this point in the history
  • Loading branch information
federicocappelli committed Apr 15, 2024
1 parent a21c5fa commit 541f86d
Showing 1 changed file with 75 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,43 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 {
return [PixelKit.Parameters.errorCode: String(code)]
case .networkProtectionWireguardErrorInvalidState(reason: let reason):
return [PixelKit.Parameters.reason: reason]
default:
case .networkProtectionActiveUser,
.networkProtectionNewUser,
.networkProtectionControllerStartAttempt,
.networkProtectionControllerStartSuccess,
.networkProtectionControllerStartFailure,
.networkProtectionTunnelStartAttempt,
.networkProtectionTunnelStartSuccess,
.networkProtectionTunnelStartFailure,
.networkProtectionTunnelUpdateAttempt,
.networkProtectionTunnelUpdateSuccess,
.networkProtectionTunnelUpdateFailure,
.networkProtectionEnableAttemptConnecting,
.networkProtectionEnableAttemptSuccess,
.networkProtectionEnableAttemptFailure,
.networkProtectionTunnelFailureDetected,
.networkProtectionTunnelFailureRecovered,
.networkProtectionLatency,
.networkProtectionLatencyError,
.networkProtectionTunnelConfigurationNoServerRegistrationInfo,
.networkProtectionTunnelConfigurationCouldNotSelectClosestServer,
.networkProtectionTunnelConfigurationCouldNotGetPeerPublicKey,
.networkProtectionTunnelConfigurationCouldNotGetPeerHostName,
.networkProtectionTunnelConfigurationCouldNotGetInterfaceAddressRange,
.networkProtectionClientFailedToParseServerListResponse,
.networkProtectionClientFailedToEncodeRegisterKeyRequest,
.networkProtectionClientFailedToParseRegisteredServersResponse,
.networkProtectionClientFailedToEncodeRedeemRequest,
.networkProtectionClientInvalidInviteCode,
.networkProtectionClientFailedToParseRedeemResponse,
.networkProtectionClientInvalidAuthToken,
.networkProtectionWireguardErrorCannotLocateTunnelFileDescriptor,
.networkProtectionWireguardErrorFailedDNSResolution,
.networkProtectionNoAuthTokenFoundError,
.networkProtectionRekeyAttempt,
.networkProtectionRekeyCompleted,
.networkProtectionRekeyFailure,
.networkProtectionSystemExtensionActivationFailure:
return nil
}
}
Expand All @@ -314,7 +350,44 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 {
.networkProtectionUnhandledError(_, _, let error),
.networkProtectionSystemExtensionActivationFailure(let error):
return error
default:
case .networkProtectionActiveUser,
.networkProtectionNewUser,
.networkProtectionControllerStartAttempt,
.networkProtectionControllerStartSuccess,
.networkProtectionTunnelStartAttempt,
.networkProtectionTunnelStartSuccess,
.networkProtectionTunnelUpdateAttempt,
.networkProtectionTunnelUpdateSuccess,
.networkProtectionEnableAttemptConnecting,
.networkProtectionEnableAttemptSuccess,
.networkProtectionEnableAttemptFailure,
.networkProtectionTunnelFailureDetected,
.networkProtectionTunnelFailureRecovered,
.networkProtectionLatency,
.networkProtectionLatencyError,
.networkProtectionTunnelConfigurationNoServerRegistrationInfo,
.networkProtectionTunnelConfigurationCouldNotSelectClosestServer,
.networkProtectionTunnelConfigurationCouldNotGetPeerPublicKey,
.networkProtectionTunnelConfigurationCouldNotGetPeerHostName,
.networkProtectionTunnelConfigurationCouldNotGetInterfaceAddressRange,
.networkProtectionClientFailedToParseServerListResponse,
.networkProtectionClientFailedToEncodeRegisterKeyRequest,
.networkProtectionClientFailedToParseRegisteredServersResponse,
.networkProtectionClientFailedToEncodeRedeemRequest,
.networkProtectionClientInvalidInviteCode,
.networkProtectionClientInvalidAuthToken,
.networkProtectionKeychainErrorFailedToCastKeychainValueToData,
.networkProtectionKeychainReadError,
.networkProtectionKeychainWriteError,
.networkProtectionKeychainUpdateError,
.networkProtectionKeychainDeleteError,
.networkProtectionWireguardErrorCannotLocateTunnelFileDescriptor,
.networkProtectionWireguardErrorInvalidState,
.networkProtectionWireguardErrorFailedDNSResolution,
.networkProtectionWireguardErrorCannotStartWireguardBackend,
.networkProtectionNoAuthTokenFoundError,
.networkProtectionRekeyAttempt,
.networkProtectionRekeyCompleted:
return nil
}
}
Expand Down

0 comments on commit 541f86d

Please sign in to comment.