net.dpml.transit
Class NullArgumentException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.IllegalArgumentException
                  extended by net.dpml.transit.NullArgumentException
All Implemented Interfaces:
Serializable

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" );
     }
 

Version:
1.0.3
Author:
Digital Product Meta Library
See Also:
Serialized Form

Constructor Summary
NullArgumentException(String argumentName)
          Constructor taking the name of the argument that was null.
 
Method Summary
 
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

NullArgumentException

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

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