Package org.ocpsoft.rewrite.param
Class ParameterizedPatternSyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.ocpsoft.rewrite.param.ParameterizedPatternSyntaxException
- All Implemented Interfaces:
Serializable
Thrown when a syntax error is found in a
ParameterizedPattern.- Author:
- Lincoln Baxter, III
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParameterizedPatternSyntaxException(String message, String pattern, int index) Create a newParameterizedPatternSyntaxException. -
Method Summary
Modifier and TypeMethodDescriptionintgetIndex()Returns the index at which the error is located in the pattern, or -1 if the location is not known.Returns a string containing the description of the syntax error and its location, the erroneous parameterized pattern string, and a visual location of the error index within the pattern (if possible.)Returns the pattern containing errors.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ParameterizedPatternSyntaxException
Create a newParameterizedPatternSyntaxException.- Parameters:
message- The error messagepattern- The pattern that contains errorsindex- The location of the error, or -1 if location is unknown
-
-
Method Details
-
getIndex
public int getIndex()Returns the index at which the error is located in the pattern, or -1 if the location is not known. -
getPattern
Returns the pattern containing errors. -
getMessage
Returns a string containing the description of the syntax error and its location, the erroneous parameterized pattern string, and a visual location of the error index within the pattern (if possible.)- Overrides:
getMessagein classThrowable
-