TP-35754 | Try Catch for Unable to Instantiate Activity
This commit is contained in:
@@ -7646,6 +7646,17 @@ class NaviAnalytics private constructor() {
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
fun unableToInstantiateActivity(errorMessage: String?) {
|
||||
NaviTrackEvent.trackEventOnClickStream(
|
||||
eventName = "dev_dfm_unable_to_instantiate_activity",
|
||||
eventValues =
|
||||
attributeMapWithScreenName(
|
||||
screenName.orEmpty(),
|
||||
mapOf(Pair("errorMessage", errorMessage.orEmpty()))
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
inner class Finarkein {
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.navi.common.utils.Constants.MODULE
|
||||
import com.navi.common.utils.EMPTY
|
||||
import com.navi.common.utils.TemporaryStorageHelper
|
||||
import com.navi.common.utils.isDynamicModuleInstalled
|
||||
import com.navi.common.utils.log
|
||||
import com.navi.common.utils.setDynamicModuleDownloadSizeInBytes
|
||||
import com.navi.common.utils.setDynamicModuleInstallationStatus
|
||||
import com.navi.common.utils.uninstallDynamicModules
|
||||
@@ -462,9 +463,14 @@ class DynamicDeliveryActivity : BaseActivity() {
|
||||
Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
)
|
||||
}
|
||||
if (needsResult.orFalse()) {
|
||||
startActivityForResult(launchIntent, requestCode.orZero())
|
||||
} else startActivity(launchIntent)
|
||||
try {
|
||||
if (needsResult.orFalse()) {
|
||||
startActivityForResult(launchIntent, requestCode.orZero())
|
||||
} else startActivity(launchIntent)
|
||||
} catch (e: Exception) {
|
||||
dynamicDeliveryEventTracker.unableToInstantiateActivity(errorMessage = e.message)
|
||||
e.log()
|
||||
}
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user