Skip to content

Commit 29fddaa

Browse files
Material Design Teamdsn5ft
authored andcommitted
[M3][Color] Provide better logging for ColorResourcesTableCreator
PiperOrigin-RevId: 449003101
1 parent 188ea55 commit 29fddaa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/java/com/google/android/material/color/ColorResourcesTableCreator.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ static byte[] create(Context context, Map<Integer, Integer> colorMapping) throws
7474
context.getResources().getResourceName(entry.getKey()),
7575
entry.getValue());
7676
if (colorResource.typeId != TYPE_ID_COLOR) {
77-
throw new IllegalArgumentException("Non color resource found: " + colorResource.name);
77+
throw new IllegalArgumentException(
78+
"Non color resource found: name="
79+
+ colorResource.name
80+
+ ", typeId="
81+
+ Integer.toHexString(colorResource.typeId & 0xFF));
7882
}
7983
PackageInfo packageInfo;
8084
if (colorResource.packageId == ANDROID_PACKAGE_ID) {

0 commit comments

Comments
 (0)