org.apache.velocity.exception
Class ParseErrorException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.apache.velocity.exception.VelocityException
              extended byorg.apache.velocity.exception.ParseErrorException
All Implemented Interfaces:
Serializable

public class ParseErrorException
extends VelocityException

Application-level exception thrown when a resource of any type has a syntax or other error which prevents it from being parsed.
When this resource is thrown, a best effort will be made to have useful information in the exception's message. For complete information, consult the runtime log.

Version:
$Id: ParseErrorException.java 345574 2005-11-18 21:11:38Z wglass $
Author:
Geir Magnusson Jr., Henning P. Schmiedehausen
See Also:
Serialized Form

Constructor Summary
ParseErrorException(ParseException pex)
          Create a ParseErrorException with the given ParseException.
ParseErrorException(String exceptionMessage)
          Create a ParseErrorException with the given message.
 
Method Summary
 int getColumnNumber()
          Return the column number of the parsing error, or -1 if not defined.
 int getLineNumber()
          Return the line number of the parsing error, or -1 if not defined.
 String getTemplateName()
          Return the name of the template containing the error, or null if not defined.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParseErrorException

public ParseErrorException(String exceptionMessage)
Create a ParseErrorException with the given message.

Parameters:
exceptionMessage - the error exception message

ParseErrorException

public ParseErrorException(ParseException pex)
Create a ParseErrorException with the given ParseException.

Parameters:
pex - the parsing exception
Method Detail

getColumnNumber

public int getColumnNumber()
Return the column number of the parsing error, or -1 if not defined.

Returns:
column number of the parsing error, or -1 if not defined

getLineNumber

public int getLineNumber()
Return the line number of the parsing error, or -1 if not defined.

Returns:
line number of the parsing error, or -1 if not defined

getTemplateName

public String getTemplateName()
Return the name of the template containing the error, or null if not defined.

Returns:
the name of the template containing the parsing error, or null if not defined


Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.