Package org.apache.velocity.exception
Class MethodInvocationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.velocity.exception.VelocityException
-
- org.apache.velocity.exception.MethodInvocationException
-
- All Implemented Interfaces:
java.io.Serializable,ExtendedParseException
public class MethodInvocationException extends VelocityException implements ExtendedParseException
Application-level exception thrown when a reference method is invoked and an exception is thrown.
When this exception 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: MethodInvocationException.java 898032 2010-01-11 19:51:03Z nbubna $
- Author:
- Geir Magnusson Jr.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MethodInvocationException(java.lang.String message, java.lang.Throwable e, java.lang.String methodName, java.lang.String templateName, int lineNumber, int columnNumber)CTOR - wraps the passed in exception for examination later
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnNumber()returns the column number where this exception occured.intgetLineNumber()returns the line number where this exception occured.java.lang.StringgetMessage()java.lang.StringgetMethodName()Returns the name of the method that threw the exception.java.lang.StringgetReferenceName()Retrieves the name of the reference that caused the exception.java.lang.StringgetTemplateName()returns the Template name where this exception occured.voidsetReferenceName(java.lang.String ref)Sets the reference name that threw this exception.-
Methods inherited from class org.apache.velocity.exception.VelocityException
getWrappedThrowable
-
-
-
-
Constructor Detail
-
MethodInvocationException
public MethodInvocationException(java.lang.String message, java.lang.Throwable e, java.lang.String methodName, java.lang.String templateName, int lineNumber, int columnNumber)CTOR - wraps the passed in exception for examination later- Parameters:
message-e- Throwable that we are wrappingmethodName- name of method that threw the exceptiontemplateName- The name of the template where the exception occured.
-
-
Method Detail
-
getMethodName
public java.lang.String getMethodName()
Returns the name of the method that threw the exception.- Returns:
- String name of method
-
setReferenceName
public void setReferenceName(java.lang.String ref)
Sets the reference name that threw this exception.- Parameters:
ref- name of reference
-
getReferenceName
public java.lang.String getReferenceName()
Retrieves the name of the reference that caused the exception.- Returns:
- name of reference.
-
getColumnNumber
public int getColumnNumber()
Description copied from interface:ExtendedParseExceptionreturns the column number where this exception occured.- Specified by:
getColumnNumberin interfaceExtendedParseException- Returns:
- The column number where this exception occured.
- Since:
- 1.5
- See Also:
ExtendedParseException.getColumnNumber()
-
getLineNumber
public int getLineNumber()
Description copied from interface:ExtendedParseExceptionreturns the line number where this exception occured.- Specified by:
getLineNumberin interfaceExtendedParseException- Returns:
- The line number where this exception occured.
- Since:
- 1.5
- See Also:
ExtendedParseException.getLineNumber()
-
getTemplateName
public java.lang.String getTemplateName()
Description copied from interface:ExtendedParseExceptionreturns the Template name where this exception occured.- Specified by:
getTemplateNamein interfaceExtendedParseException- Returns:
- The Template name where this exception occured.
- Since:
- 1.5
- See Also:
ExtendedParseException.getTemplateName()
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessagein classjava.lang.Throwable- Since:
- 1.5
- See Also:
Throwable.getMessage()
-
-