Better attribute parsing error message
This commit is contained in:
@@ -91,6 +91,9 @@ public class ContentParser{
|
||||
return Attribute.add(attr);
|
||||
});
|
||||
put(Attributes.class, (type, data) -> {
|
||||
if(!data.isObject()){
|
||||
throw new IllegalArgumentException("Attribute definitions must be objects, e.g. {heat: 10}");
|
||||
}
|
||||
Attributes attr = new Attributes();
|
||||
for(var child : data){
|
||||
Attribute value = Attribute.exists(child.name) ? Attribute.get(child.name) : Attribute.add(child.name);
|
||||
|
||||
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
||||
org.gradle.internal.http.socketTimeout=100000
|
||||
org.gradle.internal.http.connectionTimeout=100000
|
||||
android.enableR8.fullMode=false
|
||||
archash=b6926f1d27
|
||||
archash=9045acbeb2
|
||||
|
||||
Reference in New Issue
Block a user