Loading components/feature/push/src/main/java/mozilla/components/feature/push/AutoPushFeature.kt +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ import mozilla.appservices.push.AlreadyRegisteredError import mozilla.appservices.push.CommunicationError import mozilla.appservices.push.CommunicationServerError import mozilla.appservices.push.CryptoError import mozilla.appservices.push.GeneralError import mozilla.appservices.push.MissingRegistrationTokenError import mozilla.appservices.push.RecordNotFoundError import mozilla.appservices.push.StorageError Loading Loading @@ -356,6 +357,7 @@ internal fun CoroutineScope.launchAndTry( block() } catch (e: RustPushError) { val result = when (e) { is GeneralError, is CryptoError, is CommunicationError, is CommunicationServerError, Loading components/feature/push/src/test/java/mozilla/components/feature/push/AutoPushFeatureKtTest.kt +6 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import mozilla.appservices.push.AlreadyRegisteredError import mozilla.appservices.push.CommunicationError import mozilla.appservices.push.CommunicationServerError import mozilla.appservices.push.CryptoError import mozilla.appservices.push.GeneralError import mozilla.appservices.push.InternalPanic import mozilla.appservices.push.MissingRegistrationTokenError import mozilla.appservices.push.RecordNotFoundError Loading Loading @@ -96,5 +97,10 @@ class AutoPushFeatureKtTest { { throw UrlParseError("should not fail test") }, { assert(true) } ) CoroutineScope(coroutineContext).launchAndTry( { throw GeneralError("should not fail test") }, { assert(true) } ) } } Loading
components/feature/push/src/main/java/mozilla/components/feature/push/AutoPushFeature.kt +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ import mozilla.appservices.push.AlreadyRegisteredError import mozilla.appservices.push.CommunicationError import mozilla.appservices.push.CommunicationServerError import mozilla.appservices.push.CryptoError import mozilla.appservices.push.GeneralError import mozilla.appservices.push.MissingRegistrationTokenError import mozilla.appservices.push.RecordNotFoundError import mozilla.appservices.push.StorageError Loading Loading @@ -356,6 +357,7 @@ internal fun CoroutineScope.launchAndTry( block() } catch (e: RustPushError) { val result = when (e) { is GeneralError, is CryptoError, is CommunicationError, is CommunicationServerError, Loading
components/feature/push/src/test/java/mozilla/components/feature/push/AutoPushFeatureKtTest.kt +6 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import mozilla.appservices.push.AlreadyRegisteredError import mozilla.appservices.push.CommunicationError import mozilla.appservices.push.CommunicationServerError import mozilla.appservices.push.CryptoError import mozilla.appservices.push.GeneralError import mozilla.appservices.push.InternalPanic import mozilla.appservices.push.MissingRegistrationTokenError import mozilla.appservices.push.RecordNotFoundError Loading Loading @@ -96,5 +97,10 @@ class AutoPushFeatureKtTest { { throw UrlParseError("should not fail test") }, { assert(true) } ) CoroutineScope(coroutineContext).launchAndTry( { throw GeneralError("should not fail test") }, { assert(true) } ) } }