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:
java.io.Serializable
public class PatternSyntaxException extends java.lang.RuntimeException
An exception thrown by the parser if the pattern was invalid. Followingjava.util.regex.PatternSyntaxException
, this is an unchecked exception.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PatternSyntaxException(java.lang.String error)
PatternSyntaxException(java.lang.String error, java.lang.String input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
Retrieves the description of the error.int
getIndex()
Retrieves the error index.java.lang.String
getPattern()
Retrieves the erroneous regular-expression pattern.
-
-
-
Method Detail
-
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
public java.lang.String getDescription()
Retrieves the description of the error.- Returns:
- The description of the error
-
getPattern
public java.lang.String getPattern()
Retrieves the erroneous regular-expression pattern.- Returns:
- The erroneous pattern
-
-