VLJ Iteration II, v. 1.0.0.193

gov.va.med.foundations.utilities
Class ExceptionUtils

java.lang.Object
  |
  +--gov.va.med.foundations.utilities.ExceptionUtils

public class ExceptionUtils
extends java.lang.Object

Exposes utility methods for handling exceptions

Version:
1.0.0.193
Author:
Application Modernization - Foundations Team

Method Summary
static java.lang.String getFullStackTrace(java.lang.Throwable e)
          Method getFullStackTrace.
static java.lang.Throwable getNestedExceptionByClass(java.lang.Throwable e, java.lang.Class exceptionClass)
          Method getNestedExceptionByClass.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFullStackTrace

public static java.lang.String getFullStackTrace(java.lang.Throwable e)
Method getFullStackTrace.
Gets the full stack trace as a string.

Parameters:
e -
Returns:
String

getNestedExceptionByClass

public static java.lang.Throwable getNestedExceptionByClass(java.lang.Throwable e,
                                                            java.lang.Class exceptionClass)
Method getNestedExceptionByClass.
Gets the nested exception if exception is an instance of the exceptionClass or if exception implements FoundationsExceptionInterface and one of the nested exceptions is an instance of the type exceptionClass.
If desired instance of exceptionClass is not found in the nested exception stack then null is returned.
Can be used to unwind nested exception stack that implement FoundationsExceptionInterface.

Parameters:
e -
exceptionClass -
Returns:
Throwable

VLJ Iteration II, v. 1.0.0.193

VistaLink Iteration II, v. 1.0.0.193