More verbose logging

There are some ACRA reports with this IllegalStateException getting hit.
It used to be that it was only ever because we forgot to request the
correct fields from the database. However now I'm not sure that this is
the only source. Perhaps it is also possible in response to parcelling
apk instances, or maybe something else? Either way, this should provide
further info about whether the apk doesn't belong to a repo for some
reason.
This commit is contained in:
Peter Serwylo 2017-08-01 13:04:04 +10:00
parent 3b41287cf7
commit a3a0c0a15d

View File

@ -250,8 +250,10 @@ public class Apk extends ValueObject implements Comparable<Apk>, Parcelable {
private void checkRepoAddress() {
if (repoAddress == null || apkName == null) {
throw new IllegalStateException("Apk needs to have both Schema.ApkTable.Cols.REPO_ADDRESS and "
+ "Schema.ApkTable.Cols.NAME set in order to calculate URL.");
throw new IllegalStateException(
"Apk needs to have both Schema.ApkTable.Cols.REPO_ADDRESS and " +
"Schema.ApkTable.Cols.NAME set in order to calculate URL " +
"[package: " + packageName + ", versionCode: " + versionCode + ", repoId: " + repoId + "]");
}
}