Package org.apache.sis.util
Class NullArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.NullPointerException
org.apache.sis.util.NullArgumentException
- All Implemented Interfaces:
Serializable
Thrown 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.
API 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:
- 0.3
- Version:
- 0.3
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
For cross-version compatibility. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an exception with no detail message.NullArgumentException
(String message) Constructs an exception with the specified detail message. -
Method Summary
Methods inherited from class java.lang.NullPointerException
fillInStackTrace, getMessage
Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
-
Constructor Details
-
NullArgumentException
public NullArgumentException()Constructs an exception with no detail message. -
NullArgumentException
Constructs an exception with the specified detail message.- Parameters:
message
- the detail message.
-