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`

public class VelocityException extends RuntimeException
Base class for Velocity runtime exceptions thrown to the application layer.

Version:
  $Id$
Author:
  Kyle F. Downey
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`VelocityException(String exceptionMessage)`
`VelocityException(String exceptionMessage, Throwable wrapped)`
`VelocityException(String exceptionMessage, Throwable wrapped, String[] vtlStackTrace)`
`VelocityException(Throwable wrapped)`
`VelocityException(Throwable wrapped, String[] vtlStackTrace)`

## Method Summary

Modifier and Type
Method
Description
`String[]`
`getVtlStackTrace()`
`Throwable`
`getWrappedThrowable()`
Deprecated.
Use `Throwable.getCause()`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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`

## Constructor Details

### VelocityException

public VelocityException(String exceptionMessage)

Parameters:
  `exceptionMessage` - The message to register.

### VelocityException

public VelocityException(String exceptionMessage, Throwable wrapped)

Parameters:
  `exceptionMessage` - The message to register.
  `wrapped` - A throwable object that caused the Exception.
Since:
  1.5

### VelocityException

public VelocityException(String exceptionMessage, Throwable wrapped, String[] vtlStackTrace)

Parameters:
  `exceptionMessage` - The message to register.
  `wrapped` - A throwable object that caused the Exception.
  `vtlStackTrace` - VTL stacktrace
Since:
  2.2

### VelocityException

public VelocityException(Throwable wrapped)

Parameters:
  `wrapped` - A throwable object that caused the Exception.
Since:
  1.5

### VelocityException

public VelocityException(Throwable wrapped, String[] vtlStackTrace)

Parameters:
  `wrapped` - A throwable object that caused the Exception.
  `vtlStackTrace` - VTL stacktrace
Since:
  2.2

## Method Details

### getWrappedThrowable

public Throwable getWrappedThrowable()
Deprecated.
Use `Throwable.getCause()`
returns the wrapped Throwable that caused this MethodInvocationException to be thrown

Returns:
  Throwable thrown by method invocation
Since:
  1.5

### getVtlStackTrace

public String[] getVtlStackTrace()