Class 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. Following java.util.regex.PatternSyntaxException, this is an unchecked exception.
    See Also:
    Serialized Form
    • 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.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PatternSyntaxException

        public PatternSyntaxException​(java.lang.String error,
                                      java.lang.String input)
      • PatternSyntaxException

        public PatternSyntaxException​(java.lang.String error)
    • 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