public class TPatternSyntaxException extends IllegalArgumentException
TPattern
. Might include a detailed description, the original regular
expression, and the index at which the error occurred.TPattern.compile(String)
,
TPattern.compile(java.lang.String,int)
,
Serialized FormConstructor and Description |
---|
TPatternSyntaxException(String description,
String pattern,
int index)
Creates a new PatternSyntaxException for a given message, pattern, and
error index.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns the description of the syntax error, or
null if the
description is not known. |
int |
getIndex()
Returns the character index around which the error occurred, or -1 if the
index is not known.
|
String |
getMessage()
Returns a detailed error message for the exception.
|
String |
getPattern()
Returns the syntactically incorrect regular expression.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public TPatternSyntaxException(String description, String pattern, int index)
description
- the description of the syntax error, or null
if the
description is not known.pattern
- the syntactically incorrect regular expression, or
null
if the regular expression is not known.index
- the character index around which the error occurred, or -1 if
the index is not known.public String getPattern()
public String getMessage()
getMessage
in class Throwable
public String getDescription()
null
if the
description is not known.public int getIndex()
Copyright © 2019. All rights reserved.