com.gargoylesoftware.base.util
Class DetailedNullPointerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.NullPointerException
                  extended by com.gargoylesoftware.base.util.DetailedNullPointerException
All Implemented Interfaces:
java.io.Serializable

public class DetailedNullPointerException
extends java.lang.NullPointerException

A more detailed version of NullPointerException that contains information about what argument was null.

Version:
$Revision: 1.6 $
Author:
Mike Bowler
See Also:
Serialized Form

Field Summary
private  java.lang.String argumentName_
           
private static long serialVersionUID
           
 
Constructor Summary
DetailedNullPointerException(java.lang.String argumentName)
          Create an instance
DetailedNullPointerException(java.lang.String argumentName, java.lang.String message)
          Create an instance
 
Method Summary
 java.lang.String getArgumentName()
          Return 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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

argumentName_

private final java.lang.String argumentName_
Constructor Detail

DetailedNullPointerException

public DetailedNullPointerException(java.lang.String argumentName,
                                    java.lang.String message)
Create an instance

Parameters:
argumentName - The name of the argument that was null
message - The message to use in the exception

DetailedNullPointerException

public DetailedNullPointerException(java.lang.String argumentName)
Create an instance

Parameters:
argumentName - The name of the argument that was null
Method Detail

getArgumentName

public java.lang.String getArgumentName()
Return the name of the argument that was null.

Returns:
The name of the argument