Package com.google.re2j
Class PatternSyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.google.re2j.PatternSyntaxException
- All Implemented Interfaces:
Serializable
An exception thrown by the parser if the pattern was invalid.
Following
java.util.regex.PatternSyntaxException
, this is an unchecked exception.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPatternSyntaxException
(String error) PatternSyntaxException
(String error, String input) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the description of the error.int
getIndex()
Retrieves the error index.Retrieves the erroneous regular-expression pattern.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PatternSyntaxException
-
PatternSyntaxException
-
-
Method Details
-
getIndex
public int getIndex()Retrieves the error index.- Returns:
- The approximate index in the pattern of the error, or -1 if the index is not known
-
getDescription
Retrieves the description of the error.- Returns:
- The description of the error
-
getPattern
Retrieves the erroneous regular-expression pattern.- Returns:
- The erroneous pattern
-