Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw a more helpful exception when a theme lacks a certain attribute.
- Loading branch information
Showing
1 changed file
with
3 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -433,6 +433,9 @@ public final class ShadowAssetManager { | |
ResName styleAttributeResName = getResName(set.getStyleAttribute()); | ||
while (styleAttributeResName.type.equals("attr")) { | ||
AttributeResource attrValue = getOverlayedThemeValue(styleAttributeResName, theme, overlayedStyles); | ||
if (attrValue == null) { | ||
throw new NullPointerException("no value for " + styleAttributeResName.getFullyQualifiedName() + " in " + theme); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
xian
Author
Member
|
||
} | ||
if (attrValue.isResourceReference()) { | ||
styleAttributeResName = attrValue.getResourceReference(); | ||
} else if (attrValue.isStyleReference()) { | ||
|
Would it be better to throw a Resources.NotFoundException here?