pushes exception upward if triggered

This commit is contained in:
Vitor Pamplona
2025-11-07 17:33:09 -05:00
parent a996065c05
commit 948180157f
2 changed files with 4 additions and 0 deletions
@@ -27,6 +27,7 @@ import com.vitorpamplona.quartz.utils.Log
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.tasks.await
import okhttp3.OkHttpClient
import kotlin.coroutines.cancellation.CancellationException
object PushNotificationUtils {
var lastToken: String? = null
@@ -44,6 +45,7 @@ object PushNotificationUtils {
registerToken(token, accounts, okHttpClient)
} catch (e: Exception) {
if (e is CancellationException) throw e
Log.e("PushNotificationUtils", "Failed to get Firebase token", e)
}
}
@@ -26,6 +26,7 @@ import android.net.Uri
import com.vitorpamplona.quartz.nip55AndroidSigner.api.IResult
import com.vitorpamplona.quartz.nip55AndroidSigner.api.SignerResult
import com.vitorpamplona.quartz.utils.Log
import kotlinx.coroutines.CancellationException
fun <T : IResult> ContentResolver.query(
uri: Uri,
@@ -51,6 +52,7 @@ fun <T : IResult> ContentResolver.query(
}
}
} catch (e: Exception) {
if (e is CancellationException) throw e
Log.e("ExternalSignerLauncher", "Failed to query the Signer app in the background", e)
SignerResult.RequestIncomplete.ErrorExceptionCallingContentResolver(e)
}