mirror of https://github.com/M66B/FairEmail.git
Improved error message
This commit is contained in:
parent
53aaf46c3f
commit
f185a71f46
|
@ -739,8 +739,10 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||||
}
|
}
|
||||||
|
|
||||||
String json = data.toString();
|
String json = data.toString();
|
||||||
if (!json.startsWith("{") || !json.endsWith("}"))
|
if (!json.startsWith("{") || !json.endsWith("}")) {
|
||||||
throw new BadPaddingException("JSON");
|
Log.i("Invalid JSON");
|
||||||
|
throw new IllegalArgumentException(context.getString(R.string.title_setup_password_invalid));
|
||||||
|
}
|
||||||
|
|
||||||
Log.i("Importing data");
|
Log.i("Importing data");
|
||||||
JSONObject jimport = new JSONObject(json);
|
JSONObject jimport = new JSONObject(json);
|
||||||
|
|
Loading…
Reference in New Issue