refactor(common): ensure exceptions in UrlLauncher are logged

This commit is contained in:
Harsh Shandilya 2022-10-03 11:58:41 +05:30
parent 38f1fdb6a3
commit d178bebebd
No known key found for this signature in database
2 changed files with 1 additions and 2 deletions

View file

@ -20,7 +20,7 @@ class UrlLauncher(private val context: Context) : UriHandler {
customTabsIntent.launchUrl(context, Uri.parse(uri))
} catch (e: ActivityNotFoundException) {
val error = "Failed to open URL: $uri"
Napier.d(tag = "UrlLauncher") { error }
Napier.d(throwable = e, tag = "UrlLauncher") { error }
Toast.makeText(context, error, Toast.LENGTH_SHORT).show()
}
}