Class 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 $
    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
      int getColumnNumber()
      returns the column number where this exception occured.
      int getLineNumber()
      returns the line number where this exception occured.
      java.lang.String getMessage()  
      java.lang.String getMethodName()
      Returns the name of the method that threw the exception.
      java.lang.String getReferenceName()
      Retrieves the name of the reference that caused the exception.
      java.lang.String getTemplateName()
      returns the Template name where this exception occured.
      void setReferenceName​(java.lang.String ref)
      Sets the reference name that threw this exception.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, 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

      • serialVersionUID

        private static final long serialVersionUID
        Version Id for serializable
        See Also:
        Constant Field Values
      • referenceName

        private java.lang.String referenceName
      • methodName

        private final java.lang.String methodName
      • lineNumber

        private final int lineNumber
      • columnNumber

        private final int columnNumber
      • templateName

        private final java.lang.String templateName
    • 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 wrapping
        methodName - name of method that threw the exception
        templateName - 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.
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable
        Since:
        1.5
        See Also:
        Throwable.getMessage()