Constructor and Description |
---|
URISyntaxException(String input,
String msg)
Create an exception from the invalid string, with the index set to -1.
|
URISyntaxException(String input,
String msg,
int index)
Create an exception from the invalid string, with the index of the point of
failure.
|
Modifier and Type | Method and Description |
---|---|
int |
getIndex()
Returns the index of the failure, or -1.
|
String |
getInput()
Returns the bad input string.
|
String |
getMessage()
Returns a message describing the parse error, as if by
getReason() + (getIndex() >= 0 ? " at index " + getIndex() : "")
+ ": " + getInput() . |
String |
getReason()
Returns the reason for the failure.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, initCause, printStackTrace, printStackTrace, toString
public URISyntaxException(String input, String msg)
input
- the bad URImsg
- the descriptive error messageNullPointerException
- if input or msg are nullpublic URISyntaxException(String input, String msg, int index)
input
- the bad URImsg
- the descriptive error messageindex
- the index of the parse error, or -1NullPointerException
- if input or msg are nullIllegalArgumentException
- if index < -1public int getIndex()
public String getInput()
public String getMessage()
getReason() + (getIndex() >= 0 ? " at index " + getIndex() : "")
+ ": " + getInput()
.getMessage
in class Throwable
public String getReason()