org.apache.velocity.runtime.directive
Class MacroParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.velocity.runtime.parser.ParseException
org.apache.velocity.runtime.directive.MacroParseException
- All Implemented Interfaces:
- Serializable, ExtendedParseException
public class MacroParseException
- extends ParseException
- implements ExtendedParseException
Exception to indicate problem happened while constructing #macro()
For internal use in parser - not to be passed to app level
- Version:
- $Id: MacroParseException.java 463298 2006-10-12 16:10:32Z henning $
- Author:
- Geir Magnusson Jr., Henning P. Schmiedehausen
- See Also:
- Serialized Form
MacroParseException
public MacroParseException(String msg,
String templateName,
Token currentToken)
- Parameters:
msg
- templateName
- currentToken
-
getTemplateName
public String getTemplateName()
- returns the Template name where this exception occured.
- Specified by:
getTemplateName
in interface ExtendedParseException
- Returns:
- The Template name where this exception occured.
getLineNumber
public int getLineNumber()
- returns the line number where this exception occured.
- Specified by:
getLineNumber
in interface ExtendedParseException
- Returns:
- The line number where this exception occured.
getColumnNumber
public int getColumnNumber()
- returns the column number where this exception occured.
- Specified by:
getColumnNumber
in interface ExtendedParseException
- Returns:
- The column number where this exception occured.
getMessage
public String getMessage()
- This method has the standard behavior when this object has been
created using the standard constructors. Otherwise, it uses
"currentToken" and "expectedTokenSequences" to generate a parse
error message and returns it. If this object has been created
due to a parse error, and you do not catch it (it gets thrown
from the parser), then this method is called during the printing
of the final stack trace, and hence the correct error message
gets displayed.
- Overrides:
getMessage
in class ParseException
- Returns:
- the current message.
appendTemplateInfo
protected void appendTemplateInfo(StringBuffer sb)
- Parameters:
sb
-
Copyright © 2000-2007 The Apache Software Foundation. All Rights Reserved.