git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9987 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
@@ -235,7 +235,7 @@ public final class AnimChannel {
*/
public void setAnim(String name, float blendTime){
if (name == null)
- throw new NullPointerException();
+ throw new IllegalArgumentException("name cannot be null");
if (blendTime < 0f)
throw new IllegalArgumentException("blendTime cannot be less than zero");
@@ -48,7 +48,7 @@ public class EmitterBoxShape implements EmitterShape {
public EmitterBoxShape(Vector3f min, Vector3f max) {
if (min == null || max == null) {
+ throw new IllegalArgumentException("min or max cannot be null");
}
this.min = min;
@@ -49,7 +49,7 @@ public class EmitterSphereShape implements EmitterShape {
public EmitterSphereShape(Vector3f center, float radius) {
if (center == null) {
+ throw new IllegalArgumentException("center cannot be null");
if (radius <= 0) {
@@ -61,7 +61,7 @@ class BitmapTextPage extends Geometry {
super("BitmapFont", new Mesh());
if (font == null) {
- throw new NullPointerException("'font' cannot be null.");
+ throw new IllegalArgumentException("font cannot be null.");
this.page = page;
@@ -131,7 +131,7 @@ public class InputManager implements RawInputListener {
public InputManager(MouseInput mouse, KeyInput keys, JoyInput joystick, TouchInput touch) {
if (keys == null || mouse == null) {
- throw new NullPointerException("Mouse or keyboard cannot be null");
+ throw new IllegalArgumentException("Mouse or keyboard cannot be null");
this.keys = keys;
@@ -233,7 +233,7 @@ public class Node extends Spatial implements Savable {
public int attachChild(Spatial child) {
if (child == null)
+ throw new IllegalArgumentException("child cannot be null");
if (child.getParent() != this && child != this) {
if (child.getParent() != null) {