Fixed output param to Logger's warning.
Added"name" parameter when exception is thrown so it's easier to know what the name is. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8153 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
99c6a41de3
commit
87435a37d3
@ -374,7 +374,7 @@ public class Material implements Asset, Cloneable, Savable, Comparable<Material>
|
|||||||
|
|
||||||
if (type != null && paramDef.getVarType() != type) {
|
if (type != null && paramDef.getVarType() != type) {
|
||||||
logger.log(Level.WARNING, "Material parameter being set: {0} with "
|
logger.log(Level.WARNING, "Material parameter being set: {0} with "
|
||||||
+ "type {1} doesn't match definition type {2}", new Object[]{name, type.name(), paramDef.getVarType()} );
|
+ "type {1} doesn''t match definition types {2}", new Object[]{name, type.name(), paramDef.getVarType()} );
|
||||||
}
|
}
|
||||||
|
|
||||||
return newName;
|
return newName;
|
||||||
@ -439,7 +439,7 @@ public class Material implements Asset, Cloneable, Savable, Comparable<Material>
|
|||||||
|
|
||||||
MatParamTexture val = getTextureParam(name);
|
MatParamTexture val = getTextureParam(name);
|
||||||
if (val == null) {
|
if (val == null) {
|
||||||
throw new IllegalArgumentException("The given texture parameter is not set.");
|
throw new IllegalArgumentException("The given texture for parameter \"" + name + "\" is null.");
|
||||||
}
|
}
|
||||||
|
|
||||||
int texUnit = val.getUnit();
|
int texUnit = val.getUnit();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user