2 // This software is now distributed according to
3 // the Lesser Gnu Public License. Please see
4 // http://www.gnu.org/copyleft/lesser.txt for
8 package com.stevesoft.pat;
11 * When enabled, this class is thrown instead of the normal RegSyntax. Thus,
12 * enabling of this class will make your debugging easier -- but if you leave it
13 * on and forget to catch RegSyntaxError a user-supplied pattern could generate
14 * a RegSyntaxError that will kill your application.
16 * I strongly recommend turning this flag on, however, as I think it is more
17 * likely to help than to hurt your programming efforts.
19 public class RegSyntaxError extends Error
21 public static boolean RegSyntaxErrorEnabled = false;
23 public RegSyntaxError()
27 public RegSyntaxError(String s)
32 final static void endItAll(String s) throws RegSyntax
34 if (RegSyntaxErrorEnabled)
36 throw new RegSyntaxError(s);
38 throw new RegSyntax(s);