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
3.0
dan..om 13 years ago
parent 99c6a41de3
commit 87435a37d3
  1. 4
      engine/src/core/com/jme3/material/Material.java

@ -374,7 +374,7 @@ public class Material implements Asset, Cloneable, Savable, Comparable<Material>
if (type != null && paramDef.getVarType() != type) {
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;
@ -439,7 +439,7 @@ public class Material implements Asset, Cloneable, Savable, Comparable<Material>
MatParamTexture val = getTextureParam(name);
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();

Loading…
Cancel
Save