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.myfaces.shared_orchestra.util
Class ExceptionUtils

    java.lang.Object
      org.apache.myfaces.shared_orchestra.util.ExceptionUtils

    public final class ExceptionUtils

extends java.lang.Object

Various helpers to deal with exception

Author:
  imario@apache.org

Method Summary
`static java.lang.String` | `getExceptionMessage(java.util.List throwables)` Find a throwable message starting with the last element. Returns the first throwable message where `throwable.getMessage() != null`
`static java.util.List` | `getExceptions(java.lang.Throwable cause)` returns a list of all throwables (including the one you passed in) wrapped by the given throwable.

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

Method Detail

### getExceptions

    public static java.util.List getExceptions(java.lang.Throwable cause)

  returns a list of all throwables (including the one you passed in) wrapped by the given throwable. In contrast to a simple call to `getClause()` on each throwable it will also check if the throwable class contain a method `getRootCause()` (e.g. ServletException or JspException) and call it instead.

  The first list element will your passed in exception, the last list element is the cause.

### getExceptionMessage

    public static java.lang.String getExceptionMessage(java.util.List throwables)

  Find a throwable message starting with the last element.
  Returns the first throwable message where `throwable.getMessage() != null`

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 © 2009 The Apache Software Foundation. All Rights Reserved.