ExceptionUtils (Velocity 1.7 API)
Keywords: org.apache.velocity.util.ExceptionUtils class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.util
Class ExceptionUtils

    java.lang.Object
      org.apache.velocity.util.ExceptionUtils

public class ExceptionUtils
extends Object

Use this to create a new Exception. This will run under JDK 1.3 or greater. However, it running under JDK 1.4 it will set the cause.

Since:
  1.5
Author:
  Llewellyn Falco

Constructor Summary
`ExceptionUtils()`

Method Summary
`static RuntimeException` | `createRuntimeException(String message, Throwable cause)` Create a new RuntimeException, setting the cause if possible.
`static Throwable` | `createWithCause(Class clazz, String message, Throwable cause)` Create a new Exception, setting the cause if possible.
`static void` | `setCause(Throwable onObject, Throwable cause)` Set the cause of the Exception.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExceptionUtils

    public ExceptionUtils()

Method Detail

### createRuntimeException

    public static RuntimeException createRuntimeException(String message,
                                                          Throwable cause)

  Create a new RuntimeException, setting the cause if possible.

  Parameters:
    `message` -
    `cause` -
  Returns:
    A runtime exception object.

### createWithCause

    public static Throwable createWithCause(Class clazz,
                                            String message,
                                            Throwable cause)

  Create a new Exception, setting the cause if possible.

  Parameters:
    `clazz` -
    `message` -
    `cause` -
  Returns:
    A Throwable.

### setCause

    public static void setCause(Throwable onObject,
                                Throwable cause)

  Set the cause of the Exception. Will detect if this is not allowed.

  Parameters:
    `onObject` -
    `cause` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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