mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Show failed value on license-related RuntimeException
This commit is contained in:
parent
5ef4777130
commit
040d99638c
1 changed files with 3 additions and 3 deletions
|
|
@ -217,7 +217,7 @@ public class Utils {
|
|||
} else if (license.equals(Prefs.Licenses.CC_BY_SA)) {
|
||||
return "{{self|cc-by-sa-3.0}}";
|
||||
}
|
||||
throw new RuntimeException("Unrecognized license value");
|
||||
throw new RuntimeException("Unrecognized license value: " + license);
|
||||
}
|
||||
|
||||
public static int licenseNameFor(String license) {
|
||||
|
|
@ -236,7 +236,7 @@ public class Utils {
|
|||
} else if (license.equals(Prefs.Licenses.CC_BY_SA)) { // for backward compatibility to v2.1
|
||||
return R.string.license_name_cc_by_sa_3_0;
|
||||
}
|
||||
throw new RuntimeException("Unrecognized license value");
|
||||
throw new RuntimeException("Unrecognized license value: " + license);
|
||||
}
|
||||
|
||||
public static String licenseUrlFor(String license) {
|
||||
|
|
@ -251,7 +251,7 @@ public class Utils {
|
|||
} else if (license.equals(Prefs.Licenses.CC0)) {
|
||||
return "https://creativecommons.org/publicdomain/zero/1.0/";
|
||||
}
|
||||
throw new RuntimeException("Unrecognized license value");
|
||||
throw new RuntimeException("Unrecognized license value: " + license);
|
||||
}
|
||||
|
||||
public static Uri uriForWikiPage(String name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue