Make sure for shown failure dialogs we get a stacktrace

Change-Id: I775908fffc555d11bde2f8afcff6fb85056b6989
This commit is contained in:
SpiritCroc 2022-11-06 12:48:32 +01:00
parent 00da88db1d
commit e0f29a85bb

View File

@ -242,6 +242,7 @@ abstract class VectorBaseFragment<VB : ViewBinding> : Fragment(), MavericksView
} }
protected fun showErrorInSnackbar(throwable: Throwable) { protected fun showErrorInSnackbar(throwable: Throwable) {
Timber.i(throwable, "Show error snackbar for throwable")
vectorBaseActivity.getCoordinatorLayout()?.showOptimizedSnackbar(errorFormatter.toHumanReadable(throwable)) vectorBaseActivity.getCoordinatorLayout()?.showOptimizedSnackbar(errorFormatter.toHumanReadable(throwable))
} }
@ -304,6 +305,7 @@ abstract class VectorBaseFragment<VB : ViewBinding> : Fragment(), MavericksView
* ========================================================================================== */ * ========================================================================================== */
protected fun displayErrorDialog(throwable: Throwable) { protected fun displayErrorDialog(throwable: Throwable) {
Timber.i(throwable, "Showing error dialog for throwable")
MaterialAlertDialogBuilder(requireActivity()) MaterialAlertDialogBuilder(requireActivity())
.setTitle(R.string.dialog_title_error) .setTitle(R.string.dialog_title_error)
.setMessage(errorFormatter.toHumanReadable(throwable)) .setMessage(errorFormatter.toHumanReadable(throwable))