net.percederberg.grammatica.parser.re
Class RegExpException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.percederberg.grammatica.parser.re.RegExpException
All Implemented Interfaces:
java.io.Serializable

public class RegExpException
extends java.lang.Exception

A regular expression exception. This exception is thrown if a regular expression couldn't be processed (or "compiled") properly.

See Also:
Serialized Form

Field Summary
static int INVALID_REPEAT_COUNT
          The invalid repeat count error constant.
static int UNEXPECTED_CHARACTER
          The unexpected character error constant.
static int UNSUPPORTED_ESCAPE_CHARACTER
          The unsupported escape character error constant.
static int UNSUPPORTED_SPECIAL_CHARACTER
          The unsupported special character error constant.
static int UNTERMINATED_PATTERN
          The unterminated pattern error constant.
 
Constructor Summary
RegExpException(int type, int pos, java.lang.String pattern)
          Creates a new regular expression exception.
 
Method Summary
 java.lang.String getMessage()
          Returns the exception error message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNEXPECTED_CHARACTER

public static final int UNEXPECTED_CHARACTER
The unexpected character error constant. This error is used when a character was read that didn't match the allowed set of characters at the given position.

See Also:
Constant Field Values

UNTERMINATED_PATTERN

public static final int UNTERMINATED_PATTERN
The unterminated pattern error constant. This error is used when more characters were expected in the pattern.

See Also:
Constant Field Values

UNSUPPORTED_SPECIAL_CHARACTER

public static final int UNSUPPORTED_SPECIAL_CHARACTER
The unsupported special character error constant. This error is used when special regular expression characters are used in the pattern, but not supported in this implementation.

See Also:
Constant Field Values

UNSUPPORTED_ESCAPE_CHARACTER

public static final int UNSUPPORTED_ESCAPE_CHARACTER
The unsupported escape character error constant. This error is used when an escape character construct is used in the pattern, but not supported in this implementation.

See Also:
Constant Field Values

INVALID_REPEAT_COUNT

public static final int INVALID_REPEAT_COUNT
The invalid repeat count error constant. This error is used when a repetition count of zero is specified, or when the minimum exceeds the maximum.

See Also:
Constant Field Values
Constructor Detail

RegExpException

public RegExpException(int type,
                       int pos,
                       java.lang.String pattern)
Creates a new regular expression exception.

Parameters:
type - the error type constant
pos - the error position
pattern - the regular expression pattern
Method Detail

getMessage

public java.lang.String getMessage()
Returns the exception error message.

Overrides:
getMessage in class java.lang.Throwable
Returns:
the exception error message