Package org.apache.velocity.exception
Class VelocityException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.velocity.exception.VelocityException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MacroOverflowException,MathException,MethodInvocationException,ParseErrorException,ResourceNotFoundException,TemplateInitException
Base class for Velocity runtime exceptions thrown to the
application layer.
- Version:
- $Id$
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LogContextLogContext VTL location tracking contextprivate static final longVersion Id for serializableprivate String[]VTL vtlStackTrace, populated at construction when runtime.log.track_location is true -
Constructor Summary
ConstructorsConstructorDescriptionVelocityException(String exceptionMessage) VelocityException(String exceptionMessage, Throwable wrapped) VelocityException(String exceptionMessage, Throwable wrapped, String[] vtlStackTrace) VelocityException(Throwable wrapped) VelocityException(Throwable wrapped, String[] vtlStackTrace) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDVersion Id for serializable- See Also:
-
logContext
LogContext VTL location tracking context -
vtlStackTrace
VTL vtlStackTrace, populated at construction when runtime.log.track_location is true
-
-
Constructor Details
-
VelocityException
- Parameters:
exceptionMessage- The message to register.
-
VelocityException
- Parameters:
exceptionMessage- The message to register.wrapped- A throwable object that caused the Exception.- Since:
- 1.5
-
VelocityException
- Parameters:
exceptionMessage- The message to register.wrapped- A throwable object that caused the Exception.vtlStackTrace- VTL stacktrace- Since:
- 2.2
-
VelocityException
- Parameters:
wrapped- A throwable object that caused the Exception.- Since:
- 1.5
-
VelocityException
- Parameters:
wrapped- A throwable object that caused the Exception.vtlStackTrace- VTL stacktrace- Since:
- 2.2
-
-
Method Details
-
getWrappedThrowable
Deprecated.returns the wrapped Throwable that caused this MethodInvocationException to be thrown- Returns:
- Throwable thrown by method invocation
- Since:
- 1.5
-
getVtlStackTrace
-
Throwable.getCause()