Class NullArgumentException

  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byjava.lang.IllegalArgumentException
                  extended bynet.dpml.transit.NullArgumentException
All Implemented Interfaces:

public class NullArgumentException
extends IllegalArgumentException

Exception thrown when the argument to a method or constructor is null and not handled by the method/constructor/class. The argument in the only constructor of this exception should only take the name of the declared argument that is null, for instance;

     public Person( String name, int age )
         if( name == null )
             throw new NullArgumentException( "name" );
         if( age > 120 )
             throw new IllegalArgumentException( "age > 120" );
         if( age < 0 )
             throw new IllegalArgumentException( "age < 0" );

Digital Product Meta Library
See Also:
Serialized Form

Constructor Summary
NullArgumentException(String argumentName)
          Constructor taking the name of the argument that was null.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public NullArgumentException(String argumentName)
Constructor taking the name of the argument that was null.

argumentName - the source code name of the argument that caused this exception.