org.geotoolkit.util
Class NullArgumentException

Object
  extended by Throwable
      extended by Exception
          extended by RuntimeException
              extended by NullPointerException
                  extended by NullArgumentException
All Implemented Interfaces:
Serializable

public class NullArgumentException
extends NullPointerException

Throws when a null argument has been given to a method that doesn't accept them. This exception extends NullPointerException in order to stress out that the error is an illegal argument rather than an unexpected usage of a null pointer inside a method body.

Note: We could argue that this exception should extend IllegalArgumentException. However NullPointerException has become a more widely adopted practice and is now the recommended one in the Effective Java book.

Since:
3.00
Version:
3.00
Author:
Martin Desruisseaux (IRD)
See Also:
ArgumentChecks.ensureNonNull(String, Object), Serialized Form
Module:
utility/geotk-utility (download)    View source code for this class

Constructor Summary
NullArgumentException()
          Constructs an exception with no detail message.
NullArgumentException(String message)
          Constructs an exception with the specified detail message.
 
Method Summary
 
Methods inherited from class Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NullArgumentException

public NullArgumentException()
Constructs an exception with no detail message.


NullArgumentException

public NullArgumentException(String message)
Constructs an exception with the specified detail message.

Parameters:
message - The detail message.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.