java.util.regex
Class PatternSyntaxException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--java.lang.RuntimeException
|
+--java.lang.IllegalArgumentException
|
+--java.util.regex.PatternSyntaxException
Indicates illegal pattern for regular expression.
Includes state to inspect the pattern and what and where the expression
was not valid regular expression.
PatternSyntaxException
public PatternSyntaxException(java.lang.String description, java.lang.String pattern, int index)
Creates a new PatternSyntaxException.
Parameters:
getDescription
public String getDescription()
Returns a human readable escription of the syntax error.
getIndex
public int getIndex()
Returns the index of the first character in the String that was probably
invalid, or -1 when unknown.
getMessage
public String getMessage()
Returns a string containing a line with the description, a line with
the original pattern and a line indicating with a ^ which character is
probably the first invalid character in the pattern if the index is not
negative.
getPattern
public String getPattern()
Returns the original pattern that contained the syntax error.