public class BadArgumentException extends IllegalArgumentException
| Constructor and Description |
|---|
BadArgumentException(int argumentIndex,
String functionName,
String message)
Constructs a new
BadArgumentException indicating that the argument
argumentIndex passed to the function functionName is illegal,
with the error message message. |
BadArgumentException(int argumentIndex,
String functionName,
Throwable cause)
Constructs a new
BadArgumentException indicating that the argument
argumentIndex passed to the function functionName is illegal,
with cause containing the cause of the error. |
| Modifier and Type | Method and Description |
|---|---|
String |
getMessage() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic BadArgumentException(int argumentIndex,
String functionName,
String message)
BadArgumentException indicating that the argument
argumentIndex passed to the function functionName is illegal,
with the error message message.
For consistency with PUC-Lua error messages, argumentIndex should
be 1-based.
If functionName is null, "?" will be used in the error
message. message may be null, in which case no error details
will be included by this exception's getMessage().
argumentIndex - the (1-based) index of the illegal argumentfunctionName - the name of the function, may be nullmessage - the error details, may be nullpublic BadArgumentException(int argumentIndex,
String functionName,
Throwable cause)
BadArgumentException indicating that the argument
argumentIndex passed to the function functionName is illegal,
with cause containing the cause of the error.
For consistency with PUC-Lua error messages, argumentIndex should
be 1-based.
If functionName is null, "?" will be used in the error
message. cause is null or cause.getMessage() returns
null, then no error details will be included in the error message returned by
this exception's getMessage(). Otherwise, cause.getMessage()
will be used to provide the error details.
Furthermore, cause will be accessible via Throwable.getCause().
argumentIndex - the (1-based) index of the illegal argumentfunctionName - the name of the function, may be nullcause - the cause, may be nullpublic String getMessage()
getMessage in class ThrowableCopyright © 2016–2017. All rights reserved.