Avoid IllegalArgumentException crashlytics reported crash in CreateAccountFragment while generating a new brainkey.
This commit is contained in:
parent
a4537ae1c4
commit
d0109c42d5
1 changed files with 6 additions and 0 deletions
|
@ -301,6 +301,12 @@ class CreateAccountFragment : BaseAccountFragment() {
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
Log.e(TAG, "IOException while trying to generate key. Msg: " + e.message)
|
Log.e(TAG, "IOException while trying to generate key. Msg: " + e.message)
|
||||||
context?.toast(getString(R.string.error__read_dict_file))
|
context?.toast(getString(R.string.error__read_dict_file))
|
||||||
|
findNavController().navigateUp()
|
||||||
|
} catch (e: IllegalArgumentException) {
|
||||||
|
Crashlytics.logException(e)
|
||||||
|
// TODO if this does happen to real devices, use a proper error message
|
||||||
|
context?.toast(getString(R.string.error__try_again))
|
||||||
|
findNavController().navigateUp()
|
||||||
} finally {
|
} finally {
|
||||||
if (reader != null) {
|
if (reader != null) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue