public class NullArgumentException extends NullPointerException implements ExceptionContextProvider
null argument must throw
this exception.
This class is meant to signal a precondition violation ("null is an illegal
argument") and so does not extend the standard NullPointerException.
Propagation of NullPointerException from within Commons-Math is
construed to be a bug.
Note: from 4.0 onwards, this class extends NullPointerException instead
of MathIllegalArgumentException.
| Constructor and Description |
|---|
NullArgumentException()
Default constructor.
|
NullArgumentException(Localizable pattern,
Object... arguments) |
| Modifier and Type | Method and Description |
|---|---|
ExceptionContext |
getContext()
Gets a reference to the "rich context" data structure that allows to
customize error messages and store key, value pairs in exceptions.
|
String |
getLocalizedMessage() |
String |
getMessage() |
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic NullArgumentException()
public NullArgumentException(Localizable pattern, Object... arguments)
pattern - Message pattern providing the specific context of
the error.arguments - Values for replacing the placeholders in pattern.public ExceptionContext getContext()
getContext in interface ExceptionContextProviderpublic String getMessage()
getMessage in class Throwablepublic String getLocalizedMessage()
getLocalizedMessage in class ThrowableCopyright © 2003–2015 The Apache Software Foundation. All rights reserved.