20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.util.regex;
27
28 /**
29 * Unchecked exception thrown to indicate a syntax error in a
30 * regular-expression pattern.
31 *
32 * @author unascribed
33 * @since 1.4
34 * @spec JSR-51
35 */
36
37 public class PatternSyntaxException
38 extends IllegalArgumentException
39 {
40 private static final long serialVersionUID = -3864639126226059218L;
41
42 private final String desc;
43 private final String pattern;
44 private final int index;
45
46 /**
47 * Constructs a new instance of this class.
48 *
49 * @param desc
50 * A description of the error
51 *
52 * @param regex
53 * The erroneous pattern
54 *
55 * @param index
56 * The approximate index in the pattern of the error,
57 * or {@code -1} if the index is not known
58 */
59 public PatternSyntaxException(String desc, String regex, int index) {
|
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.util.regex;
27
28 /**
29 * Unchecked exception thrown to indicate a syntax error in a
30 * regular-expression pattern.
31 *
32 * @author unascribed
33 * @since 1.4
34 * @spec JSR-51
35 */
36
37 public class PatternSyntaxException
38 extends IllegalArgumentException
39 {
40 @java.io.Serial
41 private static final long serialVersionUID = -3864639126226059218L;
42
43 private final String desc;
44 private final String pattern;
45 private final int index;
46
47 /**
48 * Constructs a new instance of this class.
49 *
50 * @param desc
51 * A description of the error
52 *
53 * @param regex
54 * The erroneous pattern
55 *
56 * @param index
57 * The approximate index in the pattern of the error,
58 * or {@code -1} if the index is not known
59 */
60 public PatternSyntaxException(String desc, String regex, int index) {
|