net.dpml.transit
Class NullArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
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
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
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.