Handle start activity exceptions

This commit is contained in:
M66B
2020-07-03 17:49:01 +02:00
parent 128f718829
commit dd960c39a4
2 changed files with 12 additions and 0 deletions

View File

@@ -138,6 +138,9 @@ public class FragmentBase extends Fragment {
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, intent), Toast.LENGTH_LONG).show();
} catch (Throwable ex) {
Log.e(ex);
ToastEx.makeText(getContext(), Log.formatThrowable(ex), Toast.LENGTH_LONG).show();
}
}
@@ -148,6 +151,9 @@ public class FragmentBase extends Fragment {
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, intent), Toast.LENGTH_LONG).show();
} catch (Throwable ex) {
Log.e(ex);
ToastEx.makeText(getContext(), Log.formatThrowable(ex), Toast.LENGTH_LONG).show();
}
}