Improved error message

This commit is contained in:
M66B 2020-11-16 10:00:47 +01:00
parent 53aaf46c3f
commit f185a71f46
1 changed files with 4 additions and 2 deletions

View File

@ -739,8 +739,10 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
}
String json = data.toString();
if (!json.startsWith("{") || !json.endsWith("}"))
throw new BadPaddingException("JSON");
if (!json.startsWith("{") || !json.endsWith("}")) {
Log.i("Invalid JSON");
throw new IllegalArgumentException(context.getString(R.string.title_setup_password_invalid));
}
Log.i("Importing data");
JSONObject jimport = new JSONObject(json);